|
Re: how to get Nth row from table [message #59812 is a reply to message #59807] |
Wed, 24 December 2003 06:18 |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
There is no such thing as 'Nth row of a table'. If you meant 'Nth row from a result set' ,
SQL> create table t as select rownum X from all_objects where rownum < 100;
Table created.
SQL> select x from ( select x,ROW_NUMBER() over (order by x ) RN from t) X where X.RN=4;
X
----------
4
SQL> select x from ( select x,ROW_NUMBER() over (order by x DESC) RN from t) X where X.RN=4;
X
----------
96
HTH
Thiru
|
|
|