SQL Reference

Chapter 2 | Supported standards 33
COALESCE Returns the first value that is not NULL SELECT
Salesperson_ID,
COALESCE(Sales_Manager,
Salesperson)
FROM
Salespeople
NULLIF Compares two values and returns NULL if the two
values are equal; otherwise, returns the first
value.
SELECT
Invoice_ID,
NULLIF(Amount, -1),
Salesperson_ID
FROM
Sales_Data
Conditional
functions Description Example