如何用access选出两个表中不匹配的数据
1个回答
展开全部
请参考下列几种SQL写法,选出A表中id不存在于B表id里的记录,这里假设两张表的id都是唯一的:
1) select * from A where id not in
(select id from B);
2) select A.* from A where not exists (
select * from B where B.id=A.id);
3) select A.* from A left join B on
A.id=B.id where B.id is null;
1) select * from A where id not in
(select id from B);
2) select A.* from A where not exists (
select * from B where B.id=A.id);
3) select A.* from A left join B on
A.id=B.id where B.id is null;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询