SQL: Select first 10 records, next 10, etc
545100Mar 16 2007 — edited Mar 16 2007Hi, I need to select the first 10 records (from 0 to 10), then the next 10 (i.e from row 11 to 20), then from row 21 to 30 etc. from my database. My query is as follows:
select t1.id,t1.total_amount,t1.paid_amount,t1.unpaid_amount,
to_char(t1.date_created,'YYYY-MM-DD') date_created,
t1.num_transactions,substr(t2.name,11,99) batch_type,t1.paid_transactions,
t1.unpaid_transactions,t1.status
from table1 t1,table2 t2
where (t1.status = 'Confirmed' or t1.status = 'Rejected')
and t1.batch_type_id = t2.id
order by t1.date_created desc
Thanx!