update 表名 set
字段名=replace(字段名,要替换的字符串,替换成的字符串)
where 条件
;
例如:
update user set
sex=replace(sex,'男生','男人')
where age>24;
update 表名 set
字段名=replace(字段名,要替换的字符串,替换成的字符串)
where 条件
;
例如:
update user set
sex=replace(sex,'男生','男人')
where age>24;
转载于:https://www.cnblogs.com/af826/p/4702317.html