UPDATE SET 另一TABLE 欄位
這是 UPDATE ... select 語法:
UPDATE a SET a.a1 = ( SELECT b.b1 FROM b WHERE a.a1 = b.b1)
所以是
UPDATE a
SET a.a1=b.b1,a.a2=b.b2, a.a3=b.b3, a.a4=b.b4
(
SELECT b.b1,b.b2,b.b3,b.b4
FROM b
WHERE a.a1 = b.b1
)
是這樣嗎?