Thread: very big problem with NULL

very big problem with NULL

From
Grant
Date:
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