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 |
+--------------------+