COALESCE

A general function which takes any number of values and return the first non-null one.

Parameter Type
value
anyatomictype
Returns: anyatomictype

Example

query:

SELECT COALESCE(account, "Unknown")
  FROM sales_pipeline
  WHERE deal_stage = "In Progress"

results:

Account
Fasehatice
Unknown
Unknown
Rundofase
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Opentech

COALESCE takes any number of arguments and returns the first non-null one.