Substract string index : Sub String « String « SQL / MySQL






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








Related examples in the same category

1.Extracting Parts of Character Strings