Re: select, where and null-values (or: select null<>'1' is fuzzy)

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Peter Pilsl <pilsl(at)goldfisch(dot)at>
Cc: postgres mailinglist <pgsql-general(at)postgresql(dot)org>
Subject: Re: select, where and null-values (or: select null<>'1' is fuzzy)
Date: 2001-06-12 18:16:14
Message-ID: Pine.BSF.4.21.0106121112360.54033-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I've a problem when selecting values out a table.

It's correct. NULL<>1 is defined as NULL by the spec.
Where clauses only return rows that the expression is true
and so will not return the NULL row.

If you want the null rows to show up, you'll need to either
use coalesce or add or blah IS NULL to the expression.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Limin Liu 2001-06-12 18:18:54 Big5 contains '\'
Previous Message Andrew W. Schmeder 2001-06-12 18:10:54 Re: pg_dump problem... continued