if exists query in ms access

D

devalbhavsar

I want to check weather records avail in some table on some conditions
, right now i have to use the select count(*) in ms access,

performance point of view i can use if exists in ms sql, is there any
way we can do it in ms access also.


with regards
deval bhavsar
 
A

Allen Browne

You can use a subquery in the WHERE clause to see if any match exists in
another table.

Example:
SELECT Table1.* FROM Table1
WHERE EXISTS (SELECT ID FROM Table2
WHERE Table2.ID = Table1.ID);
 
Top