How do you compare (NULL) and (non-NULL)?

From: Wei Weng <wweng(at)kencast(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: How do you compare (NULL) and (non-NULL)?
Date: 2004-10-26 20:23:20
Message-ID: 417EB238.1000109@kencast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

In the following query

SELECT Parent FROM Channels ORDER BY Parent ASC;

If I have a couple of (NULL)s in the field [Parent], they will be listed at
the bottom of the query result.

Is it because PostgreSQL considers (NULL) as the biggest value? If I run the
same query under MSSQL Server 2000, I get the exact opposite result
regarding the order of (NULL)s and (non-NULL) values. They are listed at the
very beginning of the query result.

Thanks

Wei

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Elphick 2004-10-26 20:34:41 Re: How to re-sort a sorted query?
Previous Message Yudie 2004-10-26 19:23:30 How to re-sort a sorted query?