---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/comparison-func.md
cuppy_section: docs
cuppy_doc: 96PN-N3DX
cuppy_doc_uuid: 22e783d0-a8ce-4811-a34c-3abe9ff34173
cuppy_permalink: https://cuppy.io/salesforce/d/96PN-N3DX
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/comparison-func
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: b8f80a4fa0a15c0807a7e1a9502a246b6932f62ab17c9885bb362507c175d601
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> 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](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/subquery-comparison.html).

Compare two values:

*   [Comparison Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/comparison-operators.html) — Compare two values with `<`, `>`, `=`, and related operators.

Test ranges, `NULL` values, and boolean truth values:

*   [BETWEEN](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/between.html) — Test whether a value falls within an inclusive range.
*   [Null and Boolean Predicates](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/null-bool-predicates.html) — Test for `NULL` values and boolean truth values, including `NULL`-safe comparisons.

Compare a value against a set of values:

*   [ANY, SOME, and ALL](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/any-some-all-array.html) — Compare a value against each element of an array.
*   [IN and NOT IN](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/in.html) — Compare a value against a list of values.

*   [Subquery Comparisons](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/subquery-comparison.html)
*   [Scalar Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/scalar-functions.html)


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
