jdmartin74
Programmer
I am writing a web page that returns back a long list of results based on an Oracle DB.
Because I am getting many hundred results back, I would like to limit these on a per page basis and only show 100 records per page and have a 'Next Page' and 'Previous Page' option at the bottom as is very common.
In MySQL, I would issue the following SQL commands:
and then for the next page:
and the next page:
...and so on and so on...
However, I am unable to find an equivilent on Oracle. I have found the ROWNUM field, but I can only do the first page with this:
I can't find a way of doing subsequent pages. i.e. getting results from the middle of the dataset. A SQL command of:
...returns no records.
Any help would be appreciated.
Because I am getting many hundred results back, I would like to limit these on a per page basis and only show 100 records per page and have a 'Next Page' and 'Previous Page' option at the bottom as is very common.
In MySQL, I would issue the following SQL commands:
Code:
select * from my_table limit 0, 100
Code:
select * from my_table limit 100, 100
Code:
select * from my_table limit 200, 100
However, I am unable to find an equivilent on Oracle. I have found the ROWNUM field, but I can only do the first page with this:
Code:
select * from my_table where rownum <= 100
Code:
select * from my_table where rownum > 100 rownum <= 200
Any help would be appreciated.