update 表名 set 字段名=replace(字段名,’要替换的内容’,’替换后的内容’)
UPDATE NC_DownAddress
SET DownFileName = REPLACE(DownFileName, 'http://ftp1.book118.com:8082',
'http://ftp1.book118.com')
SELECT *
FROM NC_DownAddress
WHERE (DownFileName LIKE '%http://ftp1.book118.com%')
update yonghuxinxi set yonghubianhao=replace(yonghubianhao,'-','-')
update yonghuxinxi set yonghubianhao=replace(yonghubianhao,'--','-')[size=medium][/size]
批量替换数据库某字段部分内容
猜你喜欢
转载自caichenglong.iteye.com/blog/2307787
今日推荐
周排行