insert into 表2 select * from 表1 where not exists(select * from 表2 where 表1.关键字= 表2.关键字)
insert into 表2 select * from 表1 where id not (select Id from 表2 )
insert into 表2 select * from 表1 where id not in (select Id from 表2 )
楼主如果是不管表1中修改和删除和记录的话是否是可以这样,在表1表2中都加一个时间,保存记录保存的时间,那么第二天表2从表1导数据的话就直接日期等于第二天就行了,要不然就insert into 表2 select * from 表1 where id not in (select Id from 表2 )这个行了
select * from 表1
where not exists(select * from 表2 where 表1.关键字= 表2.关键字)
select * from 表1
where id not (select Id from 表2 )
select * from 表1
where id not in (select Id from 表2 )
select * from 表1
where id not in (select Id from 表2 )这个行了