1 Jan.2009

SQL替换 不指定

作者: [?]小猪飞飞   分类:某些。技术            | |
字段部分内容替换
update 表名(比如我案例中的ar_addonarticle) set 要修改字段名 = replace (要修改字段名,'被替换的特定字符','替换成的字符')

update ar_addonarticle set gameintro=replace(gameintro,'Play it free, rate it, send to your friends, add the game code to your blog or Myspace.','aaa') where gameintro LIKE '%Play it free, rate it, send to your friends, add the game code to your blog or Myspace.%' AND aid BETWEEN 3350 AND 3400;


查询字段内容中含有某些字符的信息
select aid from ar_addonarticle where gameintro like "%Play it free, rate it, send to your friends, add the game code to your blog or Myspace.%"


字段替换
update ar_archives y set y.description=(select y2.gameintro from ar_addonarticle y2 where y2.aid=y.id );

时间:15:23 评论(0) 引用(0) 阅读(761) Tags: ,
发表评论
  昵称 [注册]
  密码 (游客无需密码)
  网址
  电邮
OpenID登入 权限选项 表情