sql ORDER question

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
SL-Cowsrule
Forum Newbie
Posts: 13
Joined: Sat Oct 12, 2002 5:08 pm

sql ORDER question

Post by SL-Cowsrule »

Is it possible for me to order things twice?
like:
SELECT * from members ORDER name DESC
then order that?
Do i need to make a temp database to store that information, then order it again, until i like it?

For example:

name age month
Bob 12 11
Joe 17 10
Jill 17 12

How do i order it first by their age (DESC) then by their month?

CoW
Coco
Forum Contributor
Posts: 339
Joined: Sat Sep 07, 2002 5:28 am
Location: Leeds, UK
Contact:

Post by Coco »

try:
ORDER BY age, month

or another common example:
ORDER BY Last_name, First_name

[edit, stupid syntax]
Post Reply