Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Your first table
Text data types
Summary

Instruction

Excellent! As you can see, the database sorted the results in the order we asked for. Convenient, isn't it?

We can also compare text information using the logical operators (<, >, <=, >=, =, !=) that you learned in the SQL Basics course.

It's quite easy to use = (equals) and != (not equals), and the result is pretty much predictable. The following statement ...

SELECT
  *
FROM user_account
WHERE first_name = 'Mark';

... will select all the Marks in the database. But how about the following statement?

SELECT
  *
FROM user_account
WHERE nickname >= 'D';

The above query will select all users whose nickname starts with D, E, F, etc. Since A, B, and C come earlier in the alphabet (they are "lower", so to speak), nicknames starting with those letters will be skipped.

Exercise

Peter hasn't done anything since the last exercise, so we're still working with the table user_account and the columns first_name and nickname.

Select all the users whose first names start with A, B, C, or D. Use a single logical operator.