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

SQL多表关联更新

时间:2020-03-31 21:16:41      阅读:61      评论:0      收藏:0      [点我收藏+]

标签:inner   nbsp   多表关联   rac   where   span   from   div   date   

T-SQL

//方法1

UPDATE
UIT SET UIT.InnerID = UAT.InnerID FROM UserMgr_UserAccount_SchoolLeader AS UAT INNER JOIN UserMgr_UserInfo_SchoolLeader AS UIT
ON UAT.UserID = UIT.UserID

 

//方法2

UPDATE UIT
SET UIT.InnerID = UAT.InnerID
FROM UserMgr_UserAccount_SchoolLeader AS UAT,UserMgr_UserInfo_SchoolLeader AS UIT
WHERE UAT.UserID = UIT.UserID

 

SQL多表关联更新

标签:inner   nbsp   多表关联   rac   where   span   from   div   date   

原文地址:https://www.cnblogs.com/xurongjian/p/12608020.html

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