Assuming you want to order your arbitrary selection you could do something like: (SELECT t.Id FROM tab t LIMIT 10) UNION ALL (SELECT t.Id FROM tab t WHERE 1 < 0) ORDER BY t.Id
/Johan
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.
-- Johan Höök, Pythagoras Engineering Group - MailTo:[EMAIL PROTECTED] - http://www.pythagoras.se Pythagoras AB, Stormbyv. 2-4, SE-163 55 SPÅNGA, Sweden Phone: +46 8 760 00 10 Fax: +46 8 761 22 77
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]