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