Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle SELECT statement for SPECIFIC row?
not really enough info i think...
can the row number change over time?
do you need to process all rows, just one at a time?
does the magic row number link off to anywhere else?
is a rowid ok?
randy
jmckwood_at_my-deja.com wrote:
> Due to architectural limitations of the application, I need to be able
> to select individual rows in a database table, based on their "row
> number," preferably using the SELECT statement. How do I do this?
>
> For example, if database table ACCOUNTS has 250 rows, e.g.
> select count(*) from ACCOUNTS == 250
>
> I need to be able to do the following:
> for index = (1..250)
> select * from ACCOUNTS where ROWNUM = index
>
> However, when I try this, the select statement works ONLY when
> rownum == 1. If I try rownum == 5 or any other value, I get nothing
> back.
>
> Is there a way to retrieve SPECIFIC rows, by row number, without
> knowing the contents of each row?
>
> Thanks for helping ...
> Jim Wood
> jmwood_at_unispheresolutions.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Mar 15 2000 - 08:50:22 CST