Comparisons with null
- When we use single equal to compare anything with
NULL
, we get anotherNULL
. That’s even true when comparingNULL
to itself. - SQL also has
IS NULL
andIS NOT NULL
comparisons that properly check forNULL
values.
- Usually, you’ll see
IS NULL
andIS NOT NULL
as conditions inWHERE
queries.