Choice functions allow you to select from two values based on a characteristic of one of the values.

Function

Definition

Data Type Constraints

COALESCE(x, y+)

Returns the first non-null parameter

x and all y can be any compatible types

IFNULL(x, y)

NVL(x, y)

If x is null, return y; else, return x

x, y, and the return type must be the same type

NULLIF(param1, param2)

If param1 is equal to param2, return NULL; else, return param1

param1 and param2 must be compatible and comparable types