pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Lewis <jumboc@comcast.net>
To: pgsql-sql@postgresql.org
Subject: sort by on two columns
Date: Fri, 2 Jan 2004 19:15:49 -0600
Message-ID: <002101c3d197$20082f20$0201a8c0@andy2> (raw)

Hi All,
Is it possible to sort by two columns? Using the query below?
 
SELECT table1.name, table2.name, <other selected columns> FROM table1,
table2 WHERE table1.id = table2.id ORDER BY <what?>
 
I want to be able to sort the names select from two different tables and
two different colums(same data type).
 
Is this possible?
 
Thanks,
 
Andy

view thread (6+ messages)  latest in thread

Message-ID: <002101c3d197$20082f20$0201a8c0@andy2>
Permalink:  ../002101c3d197$20082f20$0201a8c0@andy2/
Also on:    postgresql.org/message-id/002101c3d197$20082f20$0201a8c0@andy2

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jumboc@comcast.net
  Subject: Re: sort by on two columns
  In-Reply-To: <002101c3d197$20082f20$0201a8c0@andy2>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox