码迷,mamicode.com
首页 > 数据库 > 详细

mysql之替换字符串

时间:2015-04-28 20:25:02      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:

update `wp_posts` set `post_content`=REPLACE(`post_content`,‘localhost/linkcp‘,‘www.linkcp.cn‘) where `post_content` like ‘%localhost/linkcp%‘;  

 

替换wp_post表post_content列中的localhost/linkcp字段为www.linkcp.cn

查询条件是post_content字段中有类似localhost/linkcp的字段

mysql之替换字符串

标签:

原文地址:http://www.cnblogs.com/yiluxiuxing/p/4463845.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!