I have a column named Name in a table called test which has Full name and I am trying to extract First name and Last Name. So I wrote query something like this:
we may also use locate function
SELECT Name, LEFT(Name,locate(' ',Name)-1) AS FIRST_NAME, SUBSTRING(Name,locate(' ',Name)+1,LENgth(Name)) AS LAST_NAME FROM test