the best way to get some records not in another table

Поиск
Список
Период
Сортировка
Искать
От
jack
Тема
the best way to get some records not in another table
Дата
Msg-id
002c01c2ed3f$e7fee740$1400a8c0@jac
Список
Дерево обсуждения
Re: the best way to get some records not in another table Christoph Haller <ch@rodos.fzk.de>
Hi, all

Try to get some records not in another table. As the following, please
advise which one will be the best way to do. Or is there any other way to do
better?

SELECT DISTINCT a.c1
FROM test_j2 a
WHERE a.c1 NOT IN (SELECT DISTINCT b.c1 FROM test_j1 b);

SELECT a.c1 FROM test_j2 a
EXCEPT
SELECT b.c1 FROM test_j1 b;


Jack


В списке pgsql-sql по дате отправления
От: Tatsuo Ishii
Дата:
От: Christoph Haller
Дата:
Сообщение: Re: Min values?
FAQ