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: Heber Ferraz-Leite <hferraz_at_via.at>
Date: 1997/11/25
Message-ID: <347a8aba.6540154@news.via.at>#1/1

On Mon, 24 Nov 97 18:18:49 GMT, ndnguyen_at_ix.netcom.com (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?

select whatever from atable where rownum=n oder by whatever;

You need the order by in this case, since you need to tell the database you want the nth according to this ordering. Otherwise you will receive a random order. (Not really random, but you can't control it)

Heber

---
hferraz_at_via.at
Received on Tue Nov 25 1997 - 00:00:00 CST

Original text of this message

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