首页 > 数据库技术 > 详细

msql 批量更新

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

 

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 批量更新

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!