Use the IS NULL and IS NOT NULL operators
/* mysql> SELECT 1 IS NULL, 1 IS NOT NULL; +-----------+---------------+ | 1 IS NULL | 1 IS NOT NULL | +-----------+---------------+ | 0 | 1 | +-----------+---------------+ 1 row in set (0.00 sec) */ SELECT 1 IS NULL, 1 IS NOT NULL;