mysql把某一个字段的值中的aa,替换成bb

sql 复制代码
UPDATE my_table  
SET my_column = REPLACE(my_column, 'aa', 'bb');

假设my_table表在替换前的数据如下:

id my_column
1 hello aa
2 world aa aa
3 no aa here

执行上述UPDATE语句后,my_table表的数据将变为:

id my_column
1 hello bb
2 world bb bb
3 no bb here
相关推荐
哈里谢顿4 小时前
MySQL 索引失效的 12 宗罪:一条 SQL 是怎样把索引踢出执行计划的?
mysql
@淡 定4 小时前
Redis热点Key独立集群实现方案
数据库·redis·缓存
laocooon5238578865 小时前
mysql,100个题目。
数据库·sql·mysql
Web极客码5 小时前
如何在Ubuntu服务器上安装和配置BIND9
服务器·数据库·ubuntu
W001hhh5 小时前
数据库实训Day004上午
数据库
funfan05176 小时前
【运维】MySQL数据库全量备份与恢复实战指南:从入门到精通
运维·数据库·mysql
+VX:Fegn08956 小时前
计算机毕业设计|基于springboot + vue在线音乐播放系统(源码+数据库+文档)
数据库·vue.js·spring boot·后端·课程设计
tq10866 小时前
通用数据引用表示法:基于协议-URI-JSONPath的简洁数据定位规范
数据库
+VX:Fegn08956 小时前
计算机毕业设计|基于springboot + vue律师咨询系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·后端·课程设计
manuel_897576 小时前
六 系统安全
网络·数据库·系统安全