null_or_empty

description

Syntax

BOOLEAN NULL_OR_EMPTY (VARCHAR str)

如果字符串为空字符串或者NULL,返回true。否则,返回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