I need to assign AAA-BBB-CCC in 3 different MySQL variables.
Here\'s the unsuccessful code:
DELIMITER $$ USE `testdepot`$$ DROP PROC
SET @t3 = SUBSTRING_INDEX(SUBSTRING_INDEX(id, '-', -2), '-', 1);
There are other ways to do it, but I find this one quite amusing :)