Re: "IS NOT NULL" != "NOT NULL"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "IS NOT NULL" != "NOT NULL"
Дата
Msg-id 23060.1011476798@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: "IS NOT NULL" != "NOT NULL"  (Sean Chittenden <sean@chittenden.org>)
Ответы Re: "IS NOT NULL" != "NOT NULL"  (Sean Chittenden <sean@chittenden.org>)
Список pgsql-general
Sean Chittenden <sean@chittenden.org> writes:
> test_pgsql=# SELECT COUNT(*) FROM test WHERE col2 NOTNULL;
>  count
> -------
>      3
> (1 row)

> test_pgsql=# SELECT COUNT(*) FROM test WHERE col2 != NULL;
>  count
> -------
>      0
> (1 row)

These are not the same thing.  See any of the past discussions about
why "null = null" and "null != null" and so forth do not do what a
novice might expect.

            regards, tom lane

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

Предыдущее
От: Sean Chittenden
Дата:
Сообщение: Re: "IS NOT NULL" != "NOT NULL"
Следующее
От: "Tim Barnard"
Дата:
Сообщение: Clarification question