IFNULL
The IFNULL function returns the first nonnull expression.
The schema is SYSIBM.
IFNULL is identical to the COALESCE scalar function except that IFNULL is limited to two arguments instead of multiple arguments. For a description, see COALESCE.
Example: For
all the rows in sample table DSN8A10.EMP, select
the employee number and salary. If the salary is missing (is null),
have the value 0 returned.
SELECT EMPNO, IFNULL(SALARY,0)
FROM DSN8A10.EMP;