How can you tell MYSQL about TRIM, the number of X characters starting from Back?
How do I write the following in MYSQL?
SELECT SUBSTRING ( - (1 TRAILING CHARACTER)) FROM table;
Basically the substring (value, 2) truncates the first letters. But I need to trim the last letters. I canβt use the substring (value, -4, 3) because I donβt know the length of the value.
Here's another example:
SELECT * FROM table WHERE SUBSTRING ( - (4 TRAILING CHARACTER)) in (SELECT SUBSTRING ( - (1 TRAILING CHARACTER)) FROM table);
+2
source to share