NULL_OR_EMPTY
Description
The null_or_empty
function checks if the given value is NULL or an empty string. It returns true if the input value is NULL or an empty string, otherwise, it returns false.
Syntax
NULL_OR_EMPTY (<str>)
Parameters
Parameter | Description |
---|---|
<str> | The string to check. |
Return Value
Returns true if the string is an empty string or NULL, otherwise returns false.
Examples
select null_or_empty(null);
+---------------------+
| null_or_empty(NULL) |
+---------------------+
| 1 |
+---------------------+
select null_or_empty("");
+-------------------+
| null_or_empty('') |
+-------------------+
| 1 |
+-------------------+
select null_or_empty("a");
+--------------------+
| null_or_empty('a') |
+--------------------+
| 0 |
+--------------------+