insert into a2 (c1,c2)
select c1,c2 from a
left join a2 on a.c1=a2.c1 and a.c2=a2.c2
where Deleted=1 and (a2.c1 is null and a2.c2 is null)
也就是两张表,没有重复的数据。
insert into a2 (c1,c2)
select c1,c2 from a
left join a2 on a.c1=a2.c1 and a.c2=a2.c2
where Deleted=1 and (a2.c1 is null and a2.c2 is null)
也就是两张表,没有重复的数据。