江西多乐彩出兑奖时间:DELETE,UPDATE与LEFT JOIN

 北京快乐八软件 www.gcpng.com 


#UPDATE:
UPDATE A SET ApproverID=NULL,ApproveDate=NULL,ApproveResult=100,CheckerID=null,CheckDate=null, IsCheck=0
FROM [SH_MaterialApplyBuyBill] A
LEFT JOIN [SH_MaterialApplyBuyBillDetail] B ON A.ID=B.[MaterialApplyBuyBillID]
WHERE A.id=125 AND @InDetailCount=0
#DELETE:
DELETE A FROM [SH_ClosingBalance] A LEFT JOIN [SH_StoreHouse] B ON A.StoreHouseID=B.ID
WHERE B.departmentID='1000'

update table1 set a.a=1
from  table1  a inner join table2 b on a.ip=b.ip

发表评论

电子邮件地址不会被公开。