SQL/MySQL/String/Sub String

Материал из SQL эксперт
Перейти к: навигация, поиск

Substract string index

/*
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);