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);
SQL SERVER
MySQL
当A表与B表某个字段值相等时,更新A表某列值等于B表某列值
DB2