WHERE
WHERE keeps only the rows that match a condition. Comparison operators are =, <> (or !=), <, >, <= and >=. Text values go in single quotes.
Example
SELECT name, score
FROM students
WHERE country = 'Nigeria';Result
name | score Ada | 92 Amina | 85 Tunde | 71 Zainab | 88
Example
SELECT name, score
FROM students
WHERE score >= 85;Result
name | score Ada | 92 Amina | 85 Zainab | 88
Exercise
Keep only rows with a score above 80.
SELECT * FROM students score > 80;
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.