finding rows in one table not in another - Mailing list pgsql-sql

From Brook Milligan
Subject finding rows in one table not in another
Date
Msg-id 199806122039.OAA29466@trillium.nmsu.edu
Whole thread Raw
List pgsql-sql
I need to find the set of rows in one table that are not in another
table.  I used a query like the following:

    select distinct id from mytable1 where id not in (select distinct id from mytable2);

However, this revealed no rows, even though I know of instances where
id from mytable1 is absent from id in mytable2.  Is there some other
way to do this?  Am I missing something?  Is there a workaround?

Cheers,
Brook

pgsql-sql by date:

Previous
From: Petter Reinholdtsen
Date:
Subject: Bug in UPDATE RULE?
Next
From: "Jackson, DeJuan"
Date:
Subject: RE: [SQL] finding rows in one table not in another