`COALESCE`

Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

markdownreferencev1ZSD2-5T44guide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sql`COALESCE`Data 360Data CloudData 360 Query Guide

Created 23 Oct 2026 · Modified 23 Oct 2026 · 1 version

Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/coalesce.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

COALESCE

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the first of its arguments that isn’t NULL.

  • <value>: An expression to evaluate. Provide two or more arguments. All arguments must be convertible to a common data type.

Returns the first argument that isn’t NULL. Returns NULL only if all arguments are NULL.

  • COALESCE evaluates only the arguments needed to determine the result. COALESCE doesn’t evaluate arguments after the first non-NULL argument.
  • Use COALESCE to substitute a default value for NULL values when displaying retrieved data.

Return the first non-NULL value and fall back to a placeholder when the earlier values are NULL.

Returns backup. This query returns the first argument if it isn’t NULL. Otherwise, it returns the second argument if it isn’t NULL. Otherwise, it returns (none).

Read this document as markdown — the same bytes an agent receives.