I have an SQL column where the records are rows. I need to display these entries after trimming the last two characters, for example, if the entry 199902345 should output 1999023 .
I tried to peek into TRIM, but it looks like it offers trimming only if we know what the last two characters are. But in my case, I donβt know what the last two numbers are, and they just need to be thrown away.
So, briefly, what string operation of MySQL allows to trim the last two characters of a string?
I must add that the string length is not fixed. It can be 9 characters, 11 characters or something else.
string sql mysql
Lucky Murari May 21 '11 at 8:49 a.m. 2011-05-21 08:49
source share