I have the following two values:
EN,
EN,FR
I want to change this to be as follows:
EN
EN,FR
How would I do the equivalent of:
str.rstrip(',')
in mysql?
答案 0 :(得分:3)
Use trim()
and specify exactly what (in this case ,
) and where (TRAILING
, LEADING
or BOTH
):
SELECT TRIM(TRAILING ',' FROM 'EN,');