isnull
Descriptionβ
Checks whether the value is NULL, returns 1 if it is NULL, and returns 0 if it is not NULL.
Syntaxβ
ISNULL(v)
Parametersβ
v: the value to check. All date types is supported.
Return valueβ
Returns 1 if it is NULL, and returns 0 if it is not NULL.
Exampleβ
MYSQL > SELECT c1, isnull(c1) FROM t1;
+------+--------------+
| c1 | `c1` IS NULL |
+------+--------------+
| NULL | 1 |
| 1 | 0 |
+------+--------------+