Query looking for no match between tables

  • Thread starter Thread starter TonyB
  • Start date Start date
T

TonyB

Hi,
I have two tables tblA, tblB both with an ID field. I want a query to select
records from A where there is no record in tblB with
a matching ID field ? How do I go about designing this ?

Regards
Tony
 
Hi,
Something like this:

SELECT tblA.* FROM tblA LEFT JOIN tblB ON tblA.id = tblB.id
WHERE tblB.id Is Null;
 
Hi Dan,
Thanks, that worked great.
Tony


Dan Artuso said:
Hi,
Something like this:

SELECT tblA.* FROM tblA LEFT JOIN tblB ON tblA.id = tblB.id
WHERE tblB.id Is Null;
 
Back
Top