SUBSTRING_INDEX() : Return a substring from a string before the specified number of occurrences of the delimiter
And if you look at the actual description you see that positive n (count of the delimiter) returns the string to the left of the delimiter whilst negative n (e.g. -2) return the substring to the right of the nth delimiter. Now image that the delimiter is ' ' (which can be explicitly stated in Mysql as '<space>').
In reply to Re^4: Truncate Data from MySQL
by stevemayes
in thread Truncate Data from MySQL
by rich731
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |