mysql> mysql> SELECT SUBSTRING('ABCDEFGHIJK', -5, 3); +---------------------------------+ | SUBSTRING('ABCDEFGHIJK', -5, 3) | +---------------------------------+ | GHI | +---------------------------------+ 1 row in set (0.00 sec) mysql>