Re: How do I change sort order behavious with nulls - Mailing list pgsql-general

From Tom Lane
Subject Re: How do I change sort order behavious with nulls
Date
Msg-id 17829.1108834984@sss.pgh.pa.us
Whole thread Raw
In response to How do I change sort order behavious with nulls  (charlie clark <charlie@begeistert.org>)
List pgsql-general
charlie clark <charlie@begeistert.org> writes:
> is there a simple way to change the way ORDER BY works on columns with
> NULLs?

No, but you can do something like

    ORDER BY foo IS NOT NULL, foo DESC

to make the nulls come first.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Group By and wildcards...
Next
From: Bruno Wolff III
Date:
Subject: Re: How do I change sort order behavious with nulls