插入没有重复的数据

来源:互联网 发布:locahost软件 编辑:程序博客网 时间:2024/05/16 15:03

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)

 

 

也就是两张表,没有重复的数据。

原创粉丝点击