Re: Using NOT IN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using NOT IN
Дата
Msg-id 6915.1062645770@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Using NOT IN  (Juan Francisco Diaz <j-diaz@publicar.com>)
Список pgsql-novice
Juan Francisco Diaz <j-diaz@publicar.com> writes:
> When i need it executed, the subquery returns 0 rows, maybe th if condition
> is false because the not in operator does not 'work' if there are 0 rows...

More likely, you have some null values in the sub-select.  NOT IN has
fairly unintuitive behavior in the presence of nulls.  See the manual.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: order by, but eliminating dupes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Errors on restoring a 7.1.2 dump to 7.3.3