| From: | zeljko <zeljko(at)holobit(dot)net> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Diferences between IN and EXISTS? |
| Date: | 2013-02-04 15:03:53 |
| Message-ID: | keoikp$2lbi$1@news.hub.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thomas Kellerer wrote:
> zeljko, 04.02.2013 10:35:
>> Edson Richter wrote:
>>
>>> Hi!
>>>
>>> Assumptions: PostgreSQL 9.2.2, Win64, already run vacumm full freeze
>>> analyze. No problems in the database. I know there are 1247 records to
>>> be found.
>>> Why does these queries return different results:
>>>
>>>
>>> select count(*) from parcela
>>> where id not in (select parcela_id from cadastroservicoparcela);
>>
>> I'm always using
>> WHERE NOT id in (blabla) and never had such problems.
>>
>
> If blabla returns NULL values, then you will have problems eventually.
but it doesn't, then blabla should say WHERE NOT some ISNULL.
zeljko
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2013-02-04 15:29:38 | Re: Adding PRIMARY KEY: Table contains duplicated values |
| Previous Message | Alexander Farber | 2013-02-04 14:57:53 | Re: Adding PRIMARY KEY: Table contains duplicated values |