selecting the last 10 rows

2006-12-30 Thread Octavian Rasnita
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

Re: selecting the last 10 rows

2006-12-30 Thread Panos Tsapralis
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