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 по дате отправления: