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

Home -> Community -> Usenet -> c.d.o.server -> Re: Question: Finding the nth row in a table

Re: Question: Finding the nth row in a table

From: Wayne Linton <lintonw_at_cadvision.com>
Date: 1997/11/24
Message-ID: <347A4051.EE9@cadvision.com>#1/1

Nguyen Nguyen wrote:
>
> Does anyone know that best way to find the nth row in a table?
> I tried to use rowid, but it doesn't seem to work. Is using the
> function chartorowid() the right approach?
>
> Thanks in advance for you help!
>
> Nguyen Nguyen
> ndnguyen_at_ix.netcom.com
>
> BTW, does anyone know a good Oracle SQL book that has
> examples of commonly/useful SQL? Thanks in advance.

Firstly, what is meant by the 9th row in a relational database table? This really has no meaning. ORACLE will put rows into blocks as it sees fit and as space for the row is available in a block (pctfree/pctused) more or less randomly. A full tablescan will start at the start of the table (as defined by its extents allocation order). I suppose if you did a full tablescan and SELECT MAX(ROWID) from nnnnnnn WHERE ROWNUM<n+1 you might get what you are looking for.

-- 
Wayne Linton
lintonw_at_cadvision.com
Received on Mon Nov 24 1997 - 00:00:00 CST

Original text of this message

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