Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
nincha
- Forum Contributor
- Posts: 191
- Joined: Fri Mar 28, 2003 12:30 pm
- Location: CA, USA
Post
by nincha »
any tips to reverse a date order in sql? Making the order from newest to oldest.
-
McGruff
- DevNet Master
- Posts: 2893
- Joined: Thu Jan 30, 2003 8:26 pm
- Location: Glasgow, Scotland
Post
by McGruff »
Add an ORDER BY clause to a SELECT query?
-
nincha
- Forum Contributor
- Posts: 191
- Joined: Fri Mar 28, 2003 12:30 pm
- Location: CA, USA
Post
by nincha »
i dont understand, right now my query is order by date, but its from oldest to newest, i would like it to be the other way
-
greenhorn666
- Forum Commoner
- Posts: 87
- Joined: Thu Aug 14, 2003 7:14 am
- Location: Brussels, Belgium
Post
by greenhorn666 »
ORDER BY date DESC (instead of the default ASC[ending])
-
JAM
- DevNet Resident
- Posts: 2101
- Joined: Fri Aug 08, 2003 6:53 pm
- Location: Sweden
-
Contact:
Post
by JAM »
Code: Select all
select foo,bar,mydate from table order by mydate desc