Re: Diferences between IN and EXISTS?

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Diferences between IN and EXISTS?
Дата
Msg-id keo1i2$8l8$1@ger.gmane.org
обсуждение исходный текст
Ответ на Re: Diferences between IN and EXISTS?  (zeljko <zeljko@holobit.net>)
Список pgsql-general
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: zeljko
Дата:
Сообщение: Re: Diferences between IN and EXISTS?
Следующее
От: Виктор Егоров
Дата:
Сообщение: Re: grouping consecutive records