insert into a(a) select a from b where b.a not in (select distinct a from a)
insert a select b.* from b left join a on a.a=b.a where a.a is null
insert into A select * from B where a not in (select a from A)
请问A表为主表 B表为导入表 字段a A,B表都存在 B表里a字段的数据与A表有重复 我想实现把B表a字段不与A表重复的内容导入A表 请问谁知道具体的SQL语句怎么写 --- insert into A表 select 字段 from B表 where B表.字段a not in(select distinct 字段a from A表)
select a from b where b.a not in (select distinct a from a)
select b.* from b left join a on a.a=b.a
where a.a is null
insert into A select * from B where a not in (select a from A)
B表里a字段的数据与A表有重复
我想实现把B表a字段不与A表重复的内容导入A表
请问谁知道具体的SQL语句怎么写
---
insert into A表
select 字段 from B表 where B表.字段a not in(select distinct 字段a from A表)