if exists query in ms access

  • Thread starter Thread starter devalbhavsar
  • Start date Start date
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
 
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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top