Comparison Operators and Predicates

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

markdownreferencev196PN-N3DXguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sqlComparison Operators and PredicatesData 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/comparison-func.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.

Comparison Operators and Predicates

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Comparison operators and predicates compare values and return a boolean result. Use them to:

  • Compare two values with the standard relational operators.
  • Test ranges with BETWEEN.
  • Handle NULL and boolean states with NULL-aware and truth-value predicates.
  • Compare against a set of values with IN, ANY/SOME, and ALL.
  • Ordinary comparison operators yield NULL (signifying “unknown”) if either input is NULL. To compare NULL as an ordinary value, use the IS [NOT] DISTINCT FROM predicates.
  • IN/NOT IN and the array quantifiers compare a value against multiple values without a subquery. For the subquery forms of these constructs, see Subquery Comparisons.

Compare two values:

Test ranges, NULL values, and boolean truth values:

  • BETWEEN — Test whether a value falls within an inclusive range.
  • Null and Boolean Predicates — Test for NULL values and boolean truth values, including NULL-safe comparisons.

Compare a value against a set of values:

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