Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question: Finding the nth row in a table
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.atReceived on Tue Nov 25 1997 - 00:00:00 CST