Neoview SQL Reference Manual (R2.4 SP2)
COALESCE Function
The COALESCE function returns the value of the first expression in the list that does not have
a NULL value or if all the expressions have NULL values, the function returns a NULL value.
COALESCE (expr1, expr2, ...)
expr1
an expression to be compared.
expr2
an expression to be compared.
Example of COALESCE
COALESCE returns the value of the first operand that is not NULL:
SELECT COALESCE (office_phone, cell_phone, home_phone, pager,
fax_num, ‘411’) from emptbl;
350 SQL Functions and Expressions