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: Dylan Wan <dwan_at_us.oracle.com>
Date: 1997/11/25
Message-ID: <347B3CC1.48EF@us.oracle.com>#1/1

You can try to use the following statement:

select your_columns
from your_table t1
where 2 =
(select count(*)
from your_table t2
where t2.sort_column <= t1.sort_column )

You can decide which column you want to sort by and the sort_column must be unique.

Hope this help.


Dylan Wan                                            dwan_at_us.oracle.com
Application Engineer
Financial Architecture
Oracle Corporation

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.
Received on Tue Nov 25 1997 - 00:00:00 CST

Original text of this message

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