一直没掌握的一个简单的Update语句

更新A表的信息,使A表的a数据=B表的b数据。这个算是比较简单的一个查询语句,但我总是搞错。

写为:(该语法在Access里是成立的)

update xsjbdab inner join adab on xsjbdab.xh=adab.xh
set xsjbdab.byrq=adab.byrq
where xsjbdab.xh like '2008%' 

正确应为:

update xsjbdab
set xsjbdab.byrq=adab.byrq
from  xsjbdab inner join adab on xsjbdab.xh=adab.xh
where xsjbdab.xh like '2008%' 
原文地址:https://www.cnblogs.com/samsonleung/p/1233336.html