NULL-related functions

The following table describes the supported NULL-related functions.

Function Description
COALESCE Returns the first non-null expression in the list. If all expressions are null, the function returns null. At least two expressions must be specified.
LNNVL Evaluates a condition when one or both operands may be null. Returns TRUE if the condition is FALSE or UNKNOWN, and FALSE if the condition is TRUE. Can be used in WHERE clauses or CASE expressions to handle nulls where IS [NOT] NULL, AND, or OR are not valid.
NANVL Returns an alternative value n1 if the input value n2 is NaN (Not a Number); otherwise, returns n2. Is applicable only for BINARY\_FLOAT or BINARY\_DOUBLE types.
NULLIF Compares expr1 and expr2. Returns null if they are equal, or expr1 if they are not. The literal NULL cannot be used for expr1.
NVL Replaces null with a specified value. If expr1 is null, returns expr2; otherwise, returns expr1.
NVL2 Returns expr2 if expr1 is not null; otherwise, returns expr3 if expr1 is null.