Re: NOT IN (NULL) ?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Paul <magamos(at)mail(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: NOT IN (NULL) ?
Date: 2010-10-31 16:44:01
Message-ID: 4CCD9CD1.7010703@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 31/10/2010 16:37, Paul wrote:
> Please, help me.
> Why the condition
> SELECT 5 NOT IN (NULL)
> returns NULL, but not FALSE (as I thought)?

Because NULL basically means "don't know" - so you don't know whether 5
is there or not.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul 2010-10-31 16:53:46 Re: NOT IN (NULL) ?
Previous Message Tom Lane 2010-10-31 16:42:27 Re: NOT IN (NULL) ?