Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: How to select 20th to 100th rows?

Re: Q: How to select 20th to 100th rows?

From: terryg8 <trg_at_ibm.net>
Date: 1997/08/14
Message-ID: <33F38EF1.3903@ibm.net>#1/1

Amit Bhati wrote:
>
> Say, I have a table with 1000 records in it. I have two numbers, x = 25
> and y = 250. I want to select the 26th. to 250th. rows of this table.
>
> In SQL how can I do this without using a SEQUENCE column in the table?
>
> E-mailed replies much appreciated. Thanks,
>
> --
> amit bhati

The implication here is that nothing orders the data in the table, yet you want the 26 to 250th rows. I believe that Oracle doesn't guarantee the order of data retrieved if you have nothing to order by. So, even if you just select everything and look at the 26 through 250th rows, there's no guarantee that the 26-250 subset would be consistent from one run to another.
I believe you should look for an alternative such as adding a sequence field.

Cheers,
TRG Received on Thu Aug 14 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US