SQL is null vs = null
January 24, 2026
I felt like I was too late to learn this, but learnt it nevertheless.
In SQL, NULL means a missing unknown value right, so it cannot work with arithmetic comparison operators such as =, <, or <>
For example when you do :
SELECT * FROM users WHERE email = NULL;This returns zero rows because the result of any arithmetic comparison with NULL is also NULL
Whereas,
SELECT * FROM users WHERE email IS NULL;Use IS NULL (or IS NOT NULL) to check for missing values.