Mega Code Archive

 
Categories / MySQL Tutorial / Comparison Functions Operators
 

SELECT ISNULL(10)

mysql> mysql> SELECT ISNULL(1/0); +-------------+ | ISNULL(1/0) | +-------------+ |           1 | +-------------+ 1 row in set (0.00 sec) mysql> ISNULL() can be used instead of = to test whether a value is NULL. Comparing a value to NULL using = always yields false. mysql>