difference between EXCEPT and NOT IN?

Поиск
Список
Период
Сортировка
От Raphael Bauduin
Тема difference between EXCEPT and NOT IN?
Дата
Msg-id f5227160804010850q74063e22t644ea4274c67730d@mail.gmail.com
обсуждение исходный текст
Ответы Re: difference between EXCEPT and NOT IN?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-sql
Hi,

The 2 following statements don't give the same result. I expected the
second ti give the exact same result as the first one.
What am I missing?

development=> SELECT id FROM entrees  except  select entree_id from
postes ORDER BY id desc; id
------3651
(1 row)
development=> SELECT id FROM entrees WHERE  id not in (select
entree_id from postes) ORDER BY id desc;id
----
(0 rows)


thanks in advance for the help.

Raph
-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: specifying wal file size
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: difference between EXCEPT and NOT IN?