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. +---------------------+
  7. MySQL [(none)]> select null_or_empty("");
  8. +-------------------+
  9. | null_or_empty('') |
  10. +-------------------+
  11. | 1 |
  12. +-------------------+
  13. MySQL [(none)]> select null_or_empty("a");
  14. +--------------------+
  15. | null_or_empty('a') |
  16. +--------------------+
  17. | 0 |
  18. +--------------------+

keyword

NULL_OR_EMPTY