selecting substring using split in mysql

by rajesh 2011-06-29 14:02:35


Mysql does not have a split like function but its subsrtring_index function can be utilized on certain situations


SUBSTRING_INDEX(str,delim,count)


Example : Substring_index("Korea, Republic",",",1)

will return us only the first part before delimiter. i.e Korea

if we need second part we can use it as
substring_index("Korea, Republic",",",2)

Tagged in:

1072
like
0
dislike
0
mail
flag

You must LOGIN to add comments