Outdated Version
You are viewing an older version of this section. View current production version.
COALESCE
Given a list of values, returns the first non-NULL value.
COALESCE ( val, [val, [val ...]])
Arguments
- val: any object
Return Type
The first non-NULL value.
Examples
memsql> select coalesce(NULL, NULL, 1, 2, 3);
+-------------------------------+
| coalesce(NULL, NULL, 1, 2, 3) |
+-------------------------------+
| 1 |
+-------------------------------+