create table ta(id int,num int)
insert into ta select 1,1
union all select 2,2
union all select 3,3
union all select 4,4
create table tb(id int,num int)
insert into tb select 1,1
union all select 2,2
union all select 3,3
union all select 4,4
union all select 5,5
union all select 6,6
union all select 7,7
union all select 8,8
insert into ta
select id,num from tb where id not in(select id from ta)