Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
See the whole table
Select some columns
Filtering rows
Logic
Text patterns
14. Use text
To be or NULL to be
A little bit of mathematics
Let's practice

Instruction

Until now, we only worked with numbers in our WHERE clauses. Is it possible to use letters instead? Of course it is! Just remember to put your text in single quotes like this: 'example'.

If you wanted to know the age of all Smiths in your table, you could use the following code:

SELECT age
FROM user
WHERE name = 'Smith';

Note that the case of the letters matters, i.e. 'Smith' is different than 'SMITH'.

Exercise

Select all columns of all Ford cars from the table.

Stuck? Here's a hint!

Type:

SELECT
  * FROM car
WHERE brand = 'Ford';