Re: Next Pages!!!!!?????? - better solution

From: John David Birch <john.birch_at_usa.net>
Date: 1999/03/15
Message-ID: <7cj08g$h2$2_at_elle.eunet.no>#1/1


There is a lot of nonsense in the answers to this question.

The "rownum" is a bad one. It works ok when dealing with the first 25 rows and thats it. As you say, you want an infinite number of rows in your table and loading all these into a query is not practical.

If we assume that the data is fairly static (can be extended but rarely updated), then a specifi row identifier is the best solution. Ideally a serial column, but a manually maintained row id would work just as well.

Include this in your table definition and use it to select the columns.

e.g.
create table myInfo( myRowID number(13), myTitle varchar(255), myDesc clob,.....)

Build an index on myRowID and renumber it on the occasions when rows are deleted such that 25 rows are already returned.

Queries would look like this

select myTitle from myTable where myRowID >25 and myRowID <= 50

John David Birch Received on Mon Mar 15 1999 - 00:00:00 CET

Original text of this message