> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CONTAINS_SUBSTR

> Tests whether a string contains another string.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

Returns NULL if either argument is NULL.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
contains_substr(value, search)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING | Yes | The string to inspect. |
| search | STRING | Yes | The substring to find. |

## Returns

* Type: BOOLEAN
* Possible values: TRUE or FALSE from a case-sensitive literal substring comparison.
* NULL behavior: Returns NULL if either argument is NULL.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT contains_substr('abc', 'b') AS found, contains_substr('abc', '') AS empty_search;
```

| found | empty\_search |
| - | - |
| true | true |

### Case-sensitive matching

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT contains_substr('Spark SQL', 'SQL') AS same_case, contains_substr('Spark SQL', 'sql') AS different_case;
```

| same\_case | different\_case |
| - | - |
| true | false |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.