> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# null_or_empty

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

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

## 语法

```Haskell theme={null}
NULL_OR_EMPTY(str)
BOOLEAN NULL_OR_EMPTY (any_array)
```

## 参数说明

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

## 返回值说明

返回值的数据类型为 BOOLEAN。

## 示例

```Plain Text theme={null}
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 |
+--------------------+

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

MySQL > select null_or_empty([1]);
+--------------------+
| null_or_empty('a') |
+--------------------+
|                  0 |
+--------------------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.