COALESCE
Evaluates the arguments in order and returns the value of the first expression that does not contain NULL.
Syntax
COALESCE(expression1, expression2, [ …, expressionN ]) → same as input type
expression: A combination of symbols and operators that the database evaluates to obtain a single data value. Expressions can be a single constant, variable, column, or scalar function.
Examples
COALESCE example
Usage Notes
All arguments in the SELECT
statement must have the same data type. Requires a minimum of two arguments, but there is no set maximum limit.
Last updated