selecting the last 10 rows
- Date: Sat, 30 Dec 2006 11:00:51 +0200
- From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
- Subject: selecting the last 10 rows
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/mysql?unsub=royale@xxxxxxxxxx