Missing values: NULL
Lesson 8 of 24 · SQL.Micro
NULL means 'unknown' or 'not filled in'. It is not zero and not empty text, and it needs its own operators.
Use IS NULL and IS NOT NULL. = NULL never matches anything.
Any arithmetic with NULL gives NULL: 5 + NULL is NULL.
COALESCE(email, 'none') replaces NULL with a default.
Check yourself
What does WHERE email = NULL return?
Show the name of customers who have no email registered.
Do it in the browser: a real SQL tool, a short mission and instant feedback. No install.
Start this lesson — free