Re: wired behaviour - Mailing list pgsql-sql

From Ragnar Hafstað
Subject Re: wired behaviour
Date
Msg-id 1227884075.32212.16.camel@localhost.localdomain
Whole thread Raw
In response to Re: wired behaviour  (Lutz Steinborn <l.steinborn@4c-ag.de>)
List pgsql-sql
On fös, 2008-11-28 at 15:22 +0100, Lutz Steinborn wrote:
> Hello Paul,
> 
> thanks for the quick answer.
> 
> > NULL values?
> Jepp, thats it.
> I've supposed this but can't believe it. So NULL is something out of this
> dimension :-)

Yes, that is one way of putting it.

A more useful way to look at it is to say that NULL represents an
UNKNOWN value.

rows with NULL bar value will not be counted by: 
> > select count(*) from foo where bar = 'Mr Spock';

because you cannot know whether the UNKNOWN value is 'Mr Spock'.

these rows will neither be counted by:
> > select count(*) from foo where NOT bar = 'Mr Spock';

because you also cannot know that the UNKNOWN value is NOT 'Mr Spock'.

Does that make it any clearer?

gnari




pgsql-sql by date:

Previous
From: Lutz Steinborn
Date:
Subject: Re: wired behaviour
Next
From: Shane Ambler
Date:
Subject: Re: wired behaviour