Skip to main content

mysql select last word in a string

Example:  select last word of column 'address' in students table:

SELECT SUBSTRING_INDEX(address,' ',-1) from students

Comments