<<SQL Server 2005 高级程序设计>> 学习笔记(2)

   1、替代inner join, left join(*=), right join(=*)
   select A.UserID, B.WorkFlowStatus from A ,B B where A.UserID=B.UserID
   这样就可以替代Inner join
   select A.UserID, B.WorkFlowStatus from A ,B B where A.UserID*=B.UserID
   通过*=或=*替代

   2、update的多种格式

   表A有UserID, WorkFlowStatus 表B中有UserID, update A.UserID=3的WorkFlowStatus为A1
   update U set u.WorkFlowStatus='A1'
   from UserLicense U
   inner join UserInformation I on U.UserID=I.UserID where U.ID=3
   小结:其实update中也可以使用Innser join来约束条件的

原文地址:https://www.cnblogs.com/whtydn/p/1710105.html