---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/contains.md
cuppy_section: docs
cuppy_doc: N27X-W4GY
cuppy_doc_uuid: 4840adec-413b-4bbc-8c4d-cee25396f135
cuppy_permalink: https://cuppy.io/salesforce/d/N27X-W4GY
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/contains
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: d8a3f771724d53f59bf86f93f2f6615d339d04a61d5fe6e7a7148e414c575ada
# 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/contains.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.

## `CONTAINS` / `ICONTAINS`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Checks whether a string contains a specified substring or character value. `CONTAINS` performs a case-sensitive search, while `ICONTAINS` performs a case-insensitive search.

*   `<string>`: The string to search within.
*   `<substring>`: The substring or character to search for.

Returns a boolean value indicating whether the string contains the substring, or NULL if either argument is NULL.

*   **Empty substring**: An empty substring returns `true` for any non-NULL string.
*   **Literal matching**: Treats the `_` and `%` characters as literal characters, not wildcards.
*   **Collation support**: Use collations for locale-aware matching, including case-insensitive (`_ci`) and accent-insensitive (`_ai`) options.

Check whether a string contains a substring (case-sensitive).

Returns `true`.

Returns `false` because the case doesn’t match.

Check whether a string contains a substring (case-insensitive).

Returns `true` because `icontains` ignores case differences.

Returns NULL when either argument is NULL.

Returns `NULL`.

Returns `NULL`.

An empty substring is always contained in any string.

Returns `true`.

Matches the `_` and `%` characters literally, not as wildcards.

Returns `false` because it treats `_` as a literal underscore.

Returns `true`.

Use collations for locale-aware matching.

Performs a case-insensitive search using German locale rules.

Performs an accent-insensitive search using the US English locale rules, matching both “cafe” and “café”.

*   [POSITION](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/position.html)
*   [STRPOS](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/strpos.html)
*   [String Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string.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 -->
