Summer Deals - hours only!Up to 80% off on all courses and bundles.-Close
See the whole table
Select some columns
Filtering rows
8. Conditional operators and selecting columns
Logic
Text patterns
To be or NULL to be
A little bit of mathematics
Let's practice

Instruction

You've got the hang of it already, haven't you? Let's combine what we know about conditional operators with selecting specific columns.

SELECT
  id,
  age
FROM user
WHERE age <= 21;

Easy, right? Instead of the asterisk (*), we just name the specific columns we're interested in.

Exercise

Select brand, model and production year of all cars cheaper than or equal 11 300.

Stuck? Here's a hint!

Type:

SELECT
  brand,
  model,
  production_year
FROM car
WHERE price <= 11300;