Loading…
NULL represents missing or unknown data. It's not the same as 0, empty string, or "nothing" — it means the value is unknown.
You cannot use = to check for NULL!
-- ❌ WRONG - This will NEVER find NULL values!
SELECT * FROM customers WHERE email = NULL;-- ✅ CORRECT
SELECT * FROM customers WHERE email IS NULL;
-- ✅ Find rows where email exists
SELECT * FROM customers WHERE email IS NOT NULL;
In SQL, NULL means "unknown". Comparing anything to an unknown value is also unknown — so NULL = NULL returns FALSE, not TRUE!
Find all customers who have not provided an email address.
Run your query to see results