Simply use LIMIT which is even more powerful than top, because you cannot only select the top ten best selling products but the number 11 to 20 as well :) Example:
SELECT * FROM myproducts ORDER BY sales LIMIT 10 will show the top ten, and: SELECT * FROM myproducts ORDER BY sales LIMIT 11,10 will show place 11 to 20 Peter > -----Original Message----- > From: Yrjö Mäenpää [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 13, 2002 9:29 PM > To: [EMAIL PROTECTED] > Subject: Any way to make a "top ten" query? > > > As there is no TOP operator nor nested selects in MySQL, I wonder if there > still exists some clever way to make"top ten" type of a query , i.e. to > select ten best selling products or ten highest mountains for example. > > thanks > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php