【发布时间】:2017-02-08 10:39:22
【问题描述】:
我想更新一列的所有字段,其中很多都有所需的字符串,但我希望这个字符串只在每个字段中出现一次,例如: "MyString OtherString MyString AnotherString AndAnother MyString"
到
"MyString OtherString AnotherString AndAnother"
您对如何实现这一点有任何想法吗?
【问题讨论】:
-
现在为您添加了一个更好的解决方案,它将处理“MyString”不是该字段中的第一个术语的情况。我希望你喜欢它!
标签: mysql replace find-occurrences