Answer the question
In order to leave comments, you need to log in
MySQL query, how to discard the last word in a string?
I didn’t find a function on the run, I came up with a monster
SELECT REVERSE(SUBSTR(REVERSE(trackname_full), POSITION(' ' IN REVERSE(trackname_full))+1)) as alt ...
Answer the question
In order to leave comments, you need to log in
Можно и другим "монстром" :-)
select substring_index(st1, ' ', length(st1) - length(replace(st1,' ',''))) as alt ....
а если перед словом не пробел, а другой разделяющий символ?
может поможет:www.mysql.ru/docs/man/Regexp.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question