Re: Order by question

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Order by question
Date: 2008-11-26 20:00:37
Message-ID: 20081126200037.GA10724@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin Kempter <kevink(at)consistentstate(dot)com> schrieb:

> 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;

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2008-11-26 20:01:36 Re: Order by question
Previous Message Grzegorz Jaśkiewicz 2008-11-26 19:59:46 Re: Order by question