update 01 set ac=bb
from 01 left join 02 on 01.aa=02.ba
where ab='30' and bb is not null
UPDATE `01` SET `01`.`AC` = `02`.`BB`
FROM `01`
INNER JOIN `02` ON `01`.`AA` = `02`.`BA`
WHERE `01`.`AB` = '030'
Table 名取的真是不理想
UPDATE dbo.01
SET dbo.01.AC=(SELECT dbo.02.BB FROM dbo.02 WHERE dbo.02.BA=dbo.01.AA)
WHERE dbo.01.AB='030'
資料庫中Table 和 Column的命名是門很重要的學問, 好的名字一看就知道裏面放是什麼..你這個問題及解答,下次再來回看.也難理解的.