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

Re: Order by question

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: "Kevin Kempter" <kevink(at)consistentstate(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Order by question
Date: 2008-11-26 19:59:46
Message-ID: 2f4958ff0811261159y7ce2648va45abe5b0510a863@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Wed, Nov 26, 2008 at 7:46 PM, Kevin Kempter
<kevink(at)consistentstate(dot)com>wrote:

> 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?
>
select * from foo order by a,b asc, c desc;
?


-- 
GJ

In response to

pgsql-general by date

Next:From: Andreas KretschmerDate: 2008-11-26 20:00:37
Subject: Re: Order by question
Previous:From: Kevin KempterDate: 2008-11-26 19:46:13
Subject: Order by question

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