Re: NOT IN (NULL) ? - Mailing list pgsql-general

From Tom Lane
Subject Re: NOT IN (NULL) ?
Date
Msg-id 23338.1288543347@sss.pgh.pa.us
Whole thread Raw
In response to NOT IN (NULL) ?  ("Paul" <magamos@mail.ru>)
Responses Re: NOT IN (NULL) ?
List pgsql-general
"Paul" <magamos@mail.ru> writes:
> Why the condition
> SELECT 5 NOT IN (NULL)
> returns NULL, but not FALSE (as I thought)?

Because the SQL standard says so.

If you think of NULL as meaning "unknown", it makes some intuitive
sense: it's unknown whether that unknown value is equal to 5.

            regards, tom lane

pgsql-general by date:

Previous
From: "Paul"
Date:
Subject: NOT IN (NULL) ?
Next
From: Raymond O'Donnell
Date:
Subject: Re: NOT IN (NULL) ?