根据分隔符拆分字符串, 将拆分后的所有字符串以 ARRAY 的格式返回
split(content, delimiter)
content
: 支持的数据类型为 VARCHAR
delimiter
: 支持的数据类型为 VARCHAR
返回值的数据类型为 ARRAY
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"] |
+------------------+