difference between EXCEPT and NOT IN? - Mailing list pgsql-sql

From Raphael Bauduin
Subject difference between EXCEPT and NOT IN?
Date
Msg-id f5227160804010850q74063e22t644ea4274c67730d@mail.gmail.com
Whole thread Raw
Responses Re: difference between EXCEPT and NOT IN?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: specifying wal file size
Next
From: Stephan Szabo
Date:
Subject: Re: difference between EXCEPT and NOT IN?