Re: wired behaviour

From: Lennin Caro <lennin(dot)caro(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org, Lutz Steinborn <l(dot)steinborn(at)4c-ag(dot)de>
Subject: Re: wired behaviour
Date: 2008-11-28 15:22:54
Message-ID: 487076.61418.qm@web59511.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- On Fri, 11/28/08, Lutz Steinborn <l(dot)steinborn(at)4c-ag(dot)de> wrote:

> From: Lutz Steinborn <l(dot)steinborn(at)4c-ag(dot)de>
> Subject: [SQL] wired behaviour
> To: pgsql-sql(at)postgresql(dot)org
> Date: Friday, November 28, 2008, 1:51 PM
> 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 ?
>
> Kindly regards
>
>
> Lutz
>
> --

Probably you have null values in bar column

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Helio Campos Mello de Andrade 2008-11-28 22:27:50 Re: Converting between UUID and VARCHAR
Previous Message Shane Ambler 2008-11-28 15:09:34 Re: wired behaviour