null_or_empty
null_or_emptyβ
descriptionβ
Syntaxβ
BOOLEAN NULL_OR_EMPTY (VARCHAR str)
It returns true if the string is an empty string or NULL. Otherwise it returns false.
exampleβ
MySQL [(none)]> select null_or_empty(null);
+---------------------+
| null_or_empty(NULL) |
+---------------------+
| 1 |
+---------------------+
MySQL [(none)]> select null_or_empty("");
+-------------------+
| null_or_empty('') |
+-------------------+
| 1 |
+-------------------+
MySQL [(none)]> select null_or_empty("a");
+--------------------+
| null_or_empty('a') |
+--------------------+
| 0 |
+--------------------+
keywordsβ
NULL_OR_EMPTY