depending on your application you could just write a query ordered by whatever your field is, then loop through the first 20. The problem I came across is assuming I wanted to display other rankings, say 21-40, or 500-1000, or some odd range not starting at the top.

Mysql (a smaller, open source database) has extended select statements with a limit clause which accomplishes this job neatly, eg

select * from emp order by whatever limit 20;

would return only the 20 records

select * from emp order by whatever limit 10, 50;

would return records 10-60. (start at 10, go for 50 records. at least that's the syntax off the top of my head).

It would be nice if this small feature was added to oracle so embedded queries with rownum's weren't required.