Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 758 Bytes

File metadata and controls

44 lines (32 loc) · 758 Bytes

null_or_empty

功能

如果字符串为空字符串或者 NULL 则返回 true,否则返回 false。

语法

NULL_OR_EMPTY(str)

参数说明

str: 支持的数据类型为 VARCHAR。

返回值说明

返回值的数据类型为 BOOLEAN。

示例

MySQL > select null_or_empty(null);
+---------------------+
| null_or_empty(NULL) |
+---------------------+
|                   1 |
+---------------------+

MySQL > select null_or_empty("");
+-------------------+
| null_or_empty('') |
+-------------------+
|                 1 |
+-------------------+

MySQL > select null_or_empty("a");
+--------------------+
| null_or_empty('a') |
+--------------------+
|                  0 |
+--------------------+