
MYSQL字符替换语句
mysql> update `table_name` set field = replace(field,'.rar','.7z');
table_name:要查询的表名,
field:表里的字段名,
replace(field,'.rar','.7z'); :正则匹配,把field字段里的 .rar 替换为 .7z
mysql> update `table_name` set field = replace(field,'.rar','.7z');
UPDATE boblog_blogs SET content = replace (content,'[mycode=xml]','[mycode=html]');
UPDATE boblog_blogs SET content = replace (content,'[//mycode]','[/mycode]');
UPDATE boblog_blogs SET htmlstat=0 where htmlstat=1