Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > difference betw...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 3379 of 3599
Post > Topic >>

difference between EXCEPT and NOT IN?

by rblists@[EMAIL PROTECTED] ("Raphael Bauduin") Apr 1, 2008 at 05:50 PM

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

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 3 Posts in Topic:
difference between EXCEPT and NOT IN?
rblists@[EMAIL PROTECTED]  2008-04-01 17:50:42 
Re: difference between EXCEPT and NOT IN?
sszabo@[EMAIL PROTECTED]   2008-04-01 09:04:22 
Re: difference between EXCEPT and NOT IN?
rblists@[EMAIL PROTECTED]  2008-04-01 18:43:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 12:25:31 CDT 2008.