SUBSTRING_INDEX()
może to zrobić, coś w rodzaju:
mysql> SELECT SUBSTRING_INDEX(SUBSTRING_INDEX('foo,bar,baz', ',', 2), ',', -1) AS middle_one;
+------------+
| middle_one |
+------------+
| bar |
+------------+
SUBSTRING_INDEX()
może to zrobić, coś w rodzaju:
mysql> SELECT SUBSTRING_INDEX(SUBSTRING_INDEX('foo,bar,baz', ',', 2), ',', -1) AS middle_one;
+------------+
| middle_one |
+------------+
| bar |
+------------+