sql server多表数据批量更新

时间:2014-02-28 08:16:56   收藏:0   阅读:475

update w
set w.TagCount=x.TagCount
from (select ItemID,COUNT(*) as TagCount from r where IsValid=1 group by ItemID) as x
where ID =4 and IsValid=1 and w.ID=x.ItemID

sql server多表数据批量更新,布布扣,bubuko.com

原文:http://www.cnblogs.com/xiaofoyuan/p/3571358.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!