SQLServer中

UPDATE  A set A.C=B.C 
from  tableA  as A(别名),tableB as  B (别名)
where A.= B.

MySQL中

UPDATE tableA  as A
inner join tableB as  B  
on  A.= B.set  A.C=B.C 

当A表与B表某个字段值相等时,更新A表某列值等于B表某列值

DB2中

UPDATE A_TEST as atest
set atest.ORG_CODE=(select ctest.code from C_TEST ctest where atest.id = ctest.id)
where atest.id in  (select ctest.id FROM TEST ctest);

更多推荐