更新条件为查询出的结果


-- oracle
update Registration a set a.unifiedcode = (select unifiedcode from Registration_bk_0528 b where a.REGID = b.REGID AND a.EXCHID = b.exchid);
-- mysql
update
tableA a inner join tableB b on a.id = b.id set a.name = b.name
原文地址:https://www.cnblogs.com/zhucww/p/9200499.html