Skip to content

Filtering with WHERE

SQL · Free lesson · No account needed

Step 1 of 9 · Start here

Filtering with WHERE

Start here

WHERE keeps only the rows that match a condition. It goes after FROM:

SELECT title, price FROM books WHERE price < 10;

The comparisons are =, <> (not equal), <, >, <= and >=. Text goes in single quotes: WHERE genre = 'Classic'. Double quotes mean a name, such as a column, not text.

You’re trying a free lesson. Your progress saves on this device. Create a free account to keep it everywhere and ask the AI tutor.