/*
mysql> select substring_index('1,2,3,4,5,6,7,8,9',",",2);
+--------------------------------------------+
| substring_index('1,2,3,4,5,6,7,8,9',",",2) |
+--------------------------------------------+
| 1,2 |
+--------------------------------------------+
1 row in set (0.01 sec)
*/
select substring_index('1,2,3,4,5,6,7,8,9',",",2);
|