本文介绍了在访问中进行查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以ms访问进行查询





我想做的是



2桌



1桌确保359 rec



2桌确保322 rec $ / $




我想查询只获取表2中不存在的记录(359)

并且确实存在于表1(322)中



结果应为37,因为322记录是两个表中存在的相同记录

I want to make query in ms access


what I want to do is

2 tables

1 tables secures 359 rec

2 tables secures 322 rec


I want to make query to get only those records which is not exist in table 2 ( 359 )
and do exist in table 1 ( 322 )

result should be 37 because 322 records are same records which exist in both tables

推荐答案

SELECT a.* FROM Table1 a
INNER JOIN Table2 b
ON a.ID = b.ID





[]


SELECT a.* FROM Table1 a
left JOIN Table2 b
ON a.ID = b.ID where b.id is null 


这篇关于在访问中进行查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 17:04