Part 1 of 5 · 1 min read
Why this page comes first
In this module you will
- Explain why
x = NULLnever matches, even when x is NULL. - Use IS NULL and IS NOT NULL correctly.
- Use COALESCE to supply a default when a value might be NULL.
- Predict how NULL affects AND, OR and NOT, not just plain equality.
NULL causes more real bugs than almost any other single SQL feature, because it quietly breaks logic that looks obviously correct. This page covers exactly how, before later modules build more complex queries on top of it.