very big problem with NULL

Поиск
Список
Период
Сортировка
От Grant
Тема very big problem with NULL
Дата
Msg-id 3B200A18.A6537536@xactcommerce.com
обсуждение исходный текст
Список pgsql-general
ok.  i've found a weird bug.  I have five records in a table.  in one
column i'm doing a select based on, two values for the column are NULL.
i do a 'SELECT testcolumn FROM testtable WHERE testcolumn!=1'.  This
query for some reason also excludes NULL, which does not make any sense
considering NULL is not equal to 1, so the records with NULL in this
column should be showing up as well.

I'm running the debian package for Postgres 7.1.2 on the Debian 'sid'
distribution.

example:

| testcolumn |
    1
    null
    0
    0
    null


SELECT testcolumn FROM testtable WHERE testcolumn != 1

results:

| testcolumn |
    0
    0




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: total newbie question
Следующее
От: Hilkiah Lavinier
Дата:
Сообщение: report writer/generator