select * from (select * from table_name order by date desc, time desc limit 10) order by date asc, time asc;
HTH, Panos. On 12/30/06, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
Hi, Is it possible to select the last 10 rows from a table in the order of their IDS, without making a separate query for finding the number of the rows? I am thinking to something like: select * from table_name order by date desc, time desc limit 10; This will select the last 10 rows, but in descending order, and I need them in ascending order. Thank you. Octavian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- Panos Tsapralis, Senior Software / Systems Engineer, +306948076902, Athens, GREECE.