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
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
NULLand boolean states withNULL-aware and truth-value predicates. - Compare against a set of values with
IN,ANY/SOME, andALL.
- Ordinary comparison operators yield
NULL(signifying “unknown”) if either input isNULL. To compareNULLas an ordinary value, use theIS [NOT] DISTINCT FROMpredicates. IN/NOT INand 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:
- Comparison Operators — Compare two values with
<,>,=, and related operators.
Test ranges, NULL values, and boolean truth values:
- BETWEEN — Test whether a value falls within an inclusive range.
- Null and Boolean Predicates — Test for
NULLvalues and boolean truth values, includingNULL-safe comparisons.
Compare a value against a set of values:
- ANY, SOME, and ALL — Compare a value against each element of an array.
- IN and NOT IN — Compare a value against a list of values.