随笔-6  评论-21  文章-0  trackbacks-0

update Friendship set friendGroup = trim(leading "2,"  from  friendGroup) where friendGroup REGEXP "^2,([:digit:],)*" ;

update Friendship set friendGroup = replace (friendGroup,',2,',',') where friendGroup REGEXP ",2,([:digit:],)*" ;

 

posted on 2008-09-16 21:33 小咔咔 阅读(385) 评论(2)  编辑  收藏 所属分类: SQL

评论:
# re: Mysql正则表达式的两个使用[未登录] 2009-10-22 15:37 | sunny
如果是我,决对不会在sql语句上加这样的判断,很耗费资源  回复  更多评论
  
# re: Mysql正则表达式的两个使用 2009-10-22 17:01 | qyb
取出来在逻辑判断更浪费时间
是数据库设计有问题
@sunny
  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: