Questions: SQL: WHERE Clause and Filtering

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

You run SELECT * FROM users WHERE email = NULL expecting to retrieve all users without an email address. The query returns zero rows despite NULL values existing in the table. Why?

ANULL is stored as an empty string, so you need WHERE email = '' instead
BNothing equals NULL — not even NULL itself — so = NULL never evaluates to true; you must use IS NULL
CThe = operator does not work on string columns; use LIKE instead
DNULL values are filtered out before the WHERE clause is evaluated
Question 2 Multiple Choice

Given the condition WHERE a = 1 OR b = 2 AND c = 3, which rows does SQL return?

ARows where (a = 1 OR b = 2) AND c = 3
BRows where a = 1, OR rows where both b = 2 AND c = 3
CRows where all three conditions are true simultaneously
DRows where any one of a = 1, b = 2, or c = 3 is true
Question 3 True / False

WHERE price BETWEEN 10 AND 50 includes rows where price equals exactly 10 or exactly 50.

TTrue
FFalse
Question 4 True / False

WHERE status = NULL is equivalent to WHERE status IS NULL and both will correctly return rows where status has no value.

TTrue
FFalse
Question 5 Short Answer

Why does WHERE column = NULL never return any rows, even when NULL values exist in that column?

Think about your answer, then reveal below.