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

# split

> Splits a string by a delimiter and returns the resulting parts as an ARRAY.

This function splits a given string according to the separators, and returns the split parts in ARRAY.

## Syntax

```SQL theme={null}
ARRAY<VARCHAR> split(VARCHAR content, VARCHAR delimiter)
```

## Examples

```SQL theme={null}
mysql> select split("a,b,c",",");
+---------------------+
| split('a,b,c', ',') |
+---------------------+
| ["a","b","c"]       |
+---------------------+

mysql> select split("a,b,c",",b,");
+-----------------------+
| split('a,b,c', ',b,') |
+-----------------------+
| ["a","c"]             |
+-----------------------+

mysql> select split("abc","");
+------------------+
| split('abc', '') |
+------------------+
| ["a","b","c"]    |
+------------------+
```

## keyword

SPLIT


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