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 > Re: difference ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 3379 of 3799
Post > Topic >>

Re: difference between EXCEPT and NOT IN?

by sszabo@[EMAIL PROTECTED] (Stephan Szabo) Apr 1, 2008 at 09:04 AM

On Tue, 1 Apr 2008, Raphael Bauduin wrote:

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

If any entree_id can be NULL they aren't defined to give the same result.

EXCEPT is defined in terms of duplicates based on distinctness, and for
example (1 is distinct from 1) is false, (1 is distinct from NULL) is true
and (NULL is distinct from NULL) if false.

NOT IN is defined in terms of equality, and for example, (1=1) is true,
(1=NULL) is unknown and (NULL=NULL) is unknown.

-- 
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
tan12V112 Mon Dec 1 22:16:49 CST 2008.