SQL Output Prediction Medium +20 XP
NULL Comparison
How many rows does this return if 3 users have NULL email?
SQLRead-only
SELECT * FROM users WHERE email = NULL;
What is the output?
Show answer and explanation
Answer: 0 rows
You cannot compare with NULL using =. NULL = NULL is not true in SQL. Use IS NULL instead.
Hint: NULL is special in SQL comparisons.
What this challenge tests
Output Prediction in SQL: null, comparison.