Yes, it is:
SELECT
@col:=col1 AS col,
@num:=REVERSE(CAST(REVERSE(@col) AS UNSIGNED)) AS num,
SUBSTRING_INDEX(@col, @num, 1) AS word
FROM
tab1
-will work only if your column contain letters and then numbers (like you've described). That's why double REVERSE()
is needed (otherwise CAST()
will have no effect). Check this demo.