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

1. MySQL [(none)]> select null_or_empty(null);
2. +---------------------+
3. | null_or_empty(NULL) |
4. +---------------------+
5. |                   1 |
6. +---------------------+

8. MySQL [(none)]> select null_or_empty("");
9. +-------------------+
10. | null_or_empty('') |
11. +-------------------+
12. |                 1 |
13. +-------------------+

15. MySQL [(none)]> select null_or_empty("a");
16. +--------------------+
17. | null_or_empty('a') |
18. +--------------------+
19. |                  0 |
20. +--------------------+

keyword

NULL_OR_EMPTY