> ## 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.

# SPLIT

> Splits a string on a regular-expression delimiter.

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

Returns NULL for NULL value/pattern or explicit NULL limit.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
split(value, pattern [, limit])
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING | Yes | The string. |
| pattern | STRING | Yes | Delimiter regex. |
| limit | INTEGER | No | Positive maximum part count; last part retains the remainder. Must be a constant argument. Default: -1 (unlimited). |

## Returns

* Type: ARRAY\<STRING>
* Possible values: The split parts.
* NULL behavior: Returns NULL for NULL value/pattern or explicit NULL limit.
* Shape: One element per part, bounded by a positive limit.
* Ordering: String encounter order.

## Properties

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

## Usage notes

* Omitted/nonpositive limit retains trailing empty parts. Empty pattern splits into Unicode characters.

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT split('a,b,c', ',', 2) AS limited, split('a,b,', ',') AS "trailing";
```

| limited | trailing |
| - | - |
| \["a","b,c"] | \["a","b",""] |

### Split without a limit

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT split('a,b,c', ',') AS result;
```

| result |
| - |
| \["a","b","c"] |

## Limitations

* Invalid regex and nonconstant limit raise errors.


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