有两个表,其中的字段是完全一样的。两个表中都有记录。
如何将A表中的记录放到B表中。
insert into B
select *
from A
where 主键 not in(select 主键 from B)
insert into B
select *
from A
where not exists(select 1
from B
where 主键1=A.主键
and 主键2=A.主键2)