visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: How to order the results?.


By: TheFalklands U.S.A.  Date: 26/04/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
Hi,

I have a question. The 'ORDER BY' Clause option will sort the results in the ascending order of the clause?. What should I do if I have to get my results in the descending order?. like in this statement..

select posting_id,title from posting order by posting_id

Here it selects and orders it in the ascending order of posting_id.

Can someone help please?.

Thanks,
By: VGR Date: 26/04/2003 17:21:00 English  Type : Answer
add DESC

ORDER BY fieldname ASC
or
ORDER BY fieldname DESC

look in <A HREF="http://www.mysql.com">www.mysql.com</a>, in search box type "order by" or "select" and RTFM :D

the signature of SELECT clearly states that ORDER BY accepts ASC|DESC

ASC is by default though

Do register to be able to answer

EContact
browser fav
page generated in 289.994960 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page