Skip site navigation (1) Skip section navigation (2)

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$ (view raw, whole thread or download thread mbox)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group