SQL 批量替换字符串的方法
update table[表名] set Fields[字段名]=replace(Fields[字段名],'被替换原容','要替换
成的内容')
如: admin@hcmcms
方法一:
update useraccount set userName = replace(userName,'@hcmcms','@aa');
方法二:
update useraccount set userName =replace(userName ,substring(userName,5,11),'@aa')