At 11:35 +0200 4/22/04, Harald Fuchs wrote:
In article <[EMAIL PROTECTED]>,
Paul DuBois <[EMAIL PROTECTED]> writes:

At 18:51 +0200 4/21/04, Jacek Jaroczynski wrote:
Is there possibility to first LIMIT and then ORDER records?

Not with a single SELECT. ORDER BY occurs before LIMIT.

 You could use LIMIT and select into a temporary table, then
 select from the temporary table with ORDER BY.

Except that LIMIT without ORDER BY doesn't make much sense: LIMIT 10 gives you the "first" 10 records according to some arbitrary order criterion.

Normally true. There may be situations where you don't particular care which 10 records you get, but you want whichever records those are to be returned in sorted order.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to