Re: sort by on two columns

From: "Chris Travers" <chris(at)travelamericas(dot)com>
To: "Andy Lewis" <jumboc(at)comcast(dot)net>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: sort by on two columns
Date: 2004-01-03 04:05:17
Message-ID: 009001c3d1b9$51b2e7a0$1800053d@winxp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

MessageSELECT * FROM customers ORDER BY last_name, first_name
Works for me.
----- Original Message -----
From: Andy Lewis
To: pgsql-sql(at)postgresql(dot)org
Sent: Saturday, January 03, 2004 8:15 AM
Subject: [SQL] sort by on two columns

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Adam Ruth 2004-01-03 04:32:51 Re: sort by on two columns
Previous Message Michael Glaesemann 2004-01-03 03:04:19 Re: sort by on two columns