Strip last two characters of a column in MySQL
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an SQL column where the entries are strings. I need to spit out those entries after trimming the last two characters, e.g. if the entry is 199902345 it should output 1999023 . I tried looking into TRIM but looks like it offers trimming only if we know what are the last two characters. But in my case, I don't know what those last two numbers are and they just needs to be discarded. So, in short, what MySQL string operation enables to trim the last two characters of a string? I must add that the length of the string is not fixed. It