Skip site navigation (1) Skip section navigation (2)

Re: wired behaviour

From: ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To: Lutz Steinborn <l(dot)steinborn(at)4c-ag(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: wired behaviour
Date: 2008-11-28 14:11:48
Message-ID: 9398884B-844E-49C1-9565-2E55838DC792@rvt.dds.nl (view raw or flat)
Thread:
Lists: pgsql-sql
On Nov 28, 2008, at 8:51 AM, Lutz Steinborn wrote:

> Hello,
>
> I have an problem understanding a simple query:
>
> For example I have the following:
> select count(*) from foo;
> gives me 1000
>
> select count(*) from foo where bar = 'Mr Spock';
> gives me 5
>
> select count(*) from foo where NOT bar = 'Mr Spock';
> gives me 857
>
> Why I'm not getting 955 for the last query ?
>
>
> Any idea ?



Do you happen to have any NULL values on the field bar??

Ries




In response to

pgsql-sql by date

Next:From: Lutz SteinbornDate: 2008-11-28 14:22:01
Subject: Re: wired behaviour
Previous:From: Paul DamDate: 2008-11-28 14:10:17
Subject: Re: wired behaviour

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group