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

msql 批量更新

时间:2017-01-11 11:12:05      阅读:250      评论:0      收藏:0      [点我收藏+]

标签:ceo   set   ace   info   bsp   and   msql   gui   更新   

 

update table a set a.placeOnPer=‘李琳‘ where placeOnPer in(
select min(placeOnPer) from (
select * from table where placeOnPer=‘李琳‘
) as a group by placeOnPer
);

update table c
set c.location=‘xxx‘ where c.guid in
select max(guid) from ( select a.guid from table a,table2 b where a.infoid=b.guid and b.placeOnPer=‘李琳‘) as a group by guid )

 

msql 批量更新

标签:ceo   set   ace   info   bsp   and   msql   gui   更新   

原文地址:http://www.cnblogs.com/shanghenshidifu/p/6272769.html

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