Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Selecting a range of records
<jabelsc_at_yahoo.com> wrote
> I want to make a select of a table with a great amount of
> records and I only want to select only a range of them, for example,
> records between number 32 and 112.
If I understand correctly, that means creating a sequence, then using that sequence as the unique number generator for all rows inserted into the table. The first row loaded, will have number 1, the second, number 2 and so on.
E.g.
CREATE SEQUENCE my_seq
START AT 1;
INSERT INTO my_large_table ( row_num, col1, col2, ... )
VALUES ( my_seq.nextval, data1, data2, ... )
> Is it posible to include a range in a select query in Oracle?
SELECT
*
FROM my_large_table
WHERE row_num BETWEEN 32 and 127
> I've heard that it's possible in Informix, I think.
Anything Informix can do, we can do better. ;-)
> What I want to do with it is decrease the traffic between
> Oracle and a JSP application we have in different servers.
A noble cause. Pity that we can not shoot the Bad and Stupid Users... :-)
-- BillyReceived on Mon Jul 23 2001 - 02:18:40 CDT
![]() |
![]() |