第一种写法:insert into table2 select * from table1 where not exists(select * from from table2 where table2.key1=table1.key1 and table2.key2=table1.key2)第二种写法(效率会高一些)insert into table2 select table1.* from table1
left outer jion table2 ontable2.key1=table1.key1 and table2.key2=table1.key2
where...