Re: I don't understand something...

From: Alexander Pyhalov <alp(at)rsu(dot)ru>
To: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: I don't understand something...
Date: 2011-10-03 07:48:45
Message-ID: 4E8968DD.2060207@rsu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/03/2011 11:19, Achilleas Mantzios wrote:
> Alexander, that's a classic one,
> rewrite your last query as :
>
> SELECT count(employee_id) from employees where employee_id not in
> (select manager_id from employees WHERE manager_id IS NOT NULL);
>
> NULLS semantics are sometimes not so obvious.

Thanks.
It's confusing, that IN check works as expected, but NOT IN works this
way...

--
Best regards,
Alexander Pyhalov,
system administrator of Computer Center of Southern Federal University

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2011-10-03 07:59:14 Re: [GENERAL] One-click installer, Windows 7 32-bit, and icacls.exe
Previous Message Achilleas Mantzios 2011-10-03 07:19:52 Re: I don't understand something...