可以这样insert into table1 select * from table2 a where not exists(select * from table1 b where 主键关联)
insert table1 select * from table2