finding rows in one table not in another

Поиск
Список
Период
Сортировка
От Brook Milligan
Тема finding rows in one table not in another
Дата
Msg-id 199806122039.OAA29466@trillium.nmsu.edu
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Petter Reinholdtsen
Дата:
Сообщение: Bug in UPDATE RULE?
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [SQL] finding rows in one table not in another