在SQL中更新替换字符串

2,473次阅读

共计 268 个字符,预计需要花费 1 分钟才能阅读完成。

T-SQL:

update TBL 
   set picture = Replace(picture, 'servera', 'serverb') 
 where picture like '%servera%'

Oracle:

update TBL 
   set picture = replace(picture, 'servera', 'serverb') 
 where picture like '%servera%'

MySQL:

update TBL 
   set picture = REPLACE(picture, 'servera', 'serverb') 
 where picture like '%servera%'

正文完
 
Blood.Cold
版权声明:本站原创文章,由 Blood.Cold 2019-06-06发表,共计268字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。