mysql:如何删除字段开头或结尾的字符 [英] mysql: How can I remove character at start or end of field
本文介绍了mysql:如何删除字段开头或结尾的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个包含逗号分隔列表的字段.一些旧记录在该字段的开头或结尾都有逗号.我需要删除这些多余的逗号.
I have field that contains a comma-separated list. Some old records have a comma at the beginning or end of the field. I need to remove these extra commas.
示例:
,the,their,then
至the,their,then
或
the,their,then,
至the,their,then
我正在寻找UPDATE语句.我需要更改记录.
I am looking for an UPDATE statement. I need to change the records.
推荐答案
which in your case would be ',' instead of 'xyz'
这篇关于mysql:如何删除字段开头或结尾的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文