split_part
Description
This function splits a given string according to the separators and returns the requested part. (start counting from the beginning)
Syntax
VARCHAR split_part(VARCHAR content, VARCHAR delimiter, INT field)
Examples
MySQL > select split_part("hello world", " ", 1);
+----------------------------------+
|split_part('hello world', ' ', 1) |
+----------------------------------+
| hello |
+----------------------------------+
MySQL > select split_part("hello world", " ", 2);
+-----------------------------------+
| split_part('hello world', ' ', 2) |
+-----------------------------------+
| world |
+-----------------------------------+
MySQL > select split_part("abca", "a", 1);
+----------------------------+
| split_part('abca', 'a', 1) |
+----------------------------+
| |
+----------------------------+
keyword
SPLIT_PART,SPLIT,PART