Re: Order by question

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Order by question
Date: 2008-11-26 20:01:36
Message-ID: ggk9ut$to5$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin Kempter wrote on 26.11.2008 20:46:
> Hi All;
>
> I'm selecting 3 columns. I want to order the results ascending by col1 and
> col2 and then descending by col3
>
> Whats the syntax for this?

ORDER BY col1 ASC, col2 ASC, col3 DESC

this is documented in the manual

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karina Guardado 2008-11-26 20:36:24 problems with special characters
Previous Message Andreas Kretschmer 2008-11-26 20:00:37 Re: Order by question