1. 按条件将表A的数据更新到表B中:
update B b
set
b.col1 = (select col1 from A a where b. id = a.code),
b.col2 = (select col2 from A a where b. id = a.code),
…………
2. 将表A的全量数据插入到表B中
insert into B (col1, col2, col3, col4,……)
select col1, col2, col3, col4,…… from A