Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

order by

Status
Not open for further replies.

QuintonV

Technical User
Joined
Jul 3, 2001
Messages
37
Location
ZA
Hi

Is there anyway to order by more then one field in mysql?
I want to order by the key field and another field which has dates , in laymans terms by multiple fields not just one also can they hav difrent orders ie asc and others desc?
 
In the words a former co-worker used to use: RTMF... read the manual first... Search Access Help on ORDER BY Clause.

Example:
SELECT ClassList.CourseID, ClassList.CourseStartDate, ClassList.CourseLocCode, ClassList.Last4SSN
FROM ClassList
ORDER BY ClassList.CourseID, ClassList.CourseStartDate DESC, ClassList.CourseLocCode;

A tip to learn SQL is to use the Query Design view and then review the SQL used to construct the query....

Steve Medvid
"IT Consultant & Web Master"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top