select * into temp from talbe1 union select * from table2 go truncate table table1 insert into table1 select * from temp drop table temp
or insert into table1 select * from table2 select distinct * into temp from table1 truncate table talbe1 insert into talbe1 select * from temp drop table temp
insert into b select * from a t where not exists(select * from b where 列1=t.列1 and 列2=t.列2 and 列3=t.列3)
union
select * from table2
go
truncate table table1
insert into table1 select * from temp
drop table temp
insert into table1 select * from table2
select distinct * into temp from table1
truncate table talbe1
insert into talbe1 select * from temp
drop table temp
select * from a t
where not exists(select * from b where 列1=t.列1 and 列2=t.列2 and 列3=t.列3)