Search Postgresql Archives

Re: How do I change sort order behavious with nulls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



charlie clark <charlie@xxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux