如何在 MS Access 中实现 SQL INTERSECT 和 MINUS 操作 [英] How can I implement SQL INTERSECT and MINUS operations in MS Access
本文介绍了如何在 MS Access 中实现 SQL INTERSECT 和 MINUS 操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经研究过,但还没有找到在 MS Access 中运行 INTERSECT 和 MINUS 操作的方法.有没有办法
I have researched and haven't found a way to run INTERSECT and MINUS operations in MS Access. Does any way exist
推荐答案
INTERSECT 是内连接.MINUS 是外连接,您可以在其中仅选择其他表中不存在的记录.<小时>相交
INTERSECT is an inner join. MINUS is an outer join, where you choose only the records that don't exist in the other table.
INTERSECT
select distinct
a.*
from
a
inner join b on a.id = b.id
<小时>
减号
select distinct
a.*
from
a
left outer join b on a.id = b.id
where
b.id is null
如果您编辑原始问题并发布一些示例数据,则可以提供示例.
If you edit your original question and post some sample data then an example can be given.
忘记添加不同的查询.
这篇关于如何在 MS Access 中实现 SQL INTERSECT 和 MINUS 操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文