Mysql全表替换 指定字符串
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;