How to split the name string in mysql ?
E.g.:
name ----- Sachin ramesh tendulkar Rahul dravid
Split the name like firstname
firstname
You can use bewlo one also:
SELECT SUBSTRING_INDEX(Name, ' ', 1) AS fname, SUBSTRING_INDEX(SUBSTRING_INDEX(Name,' ', 2), ' ',-1) AS mname, SUBSTRING_INDEX(Name, ' ', -1) as lname FROM mytable;