Product Solutions Support
Try MemSQL

IFNULL

Returns the second argument if the first argument is NULL, else returns the first argument.

Syntax

IFNULL (val1, val2)

Arguments

Return Type

Examples

memsql> select ifnull(NULL, 'plan b'), ifnull('plan a', 'plan b');
+------------------------+----------------------------+
| ifnull(NULL, 'plan b') | ifnull('plan a', 'plan b') |
+------------------------+----------------------------+
| plan b                 | plan a                     |
+------------------------+----------------------------+
Was this article useful?