更新条件为查询出的结果


-- 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

 

posted on 2018-06-19 18:10  朱春旺  阅读(1902)  评论(0编辑  收藏  举报