Retrieve Nth Row from a table

select * from(

select rownum rn,t.* from table_name t

where rownum<=N)

where rn=N;

Example:

select * from(

select rownum rn,t.* from employee t

where rownum<=101)

where rn=100;

Or

select * from table_name a

where rownum <= N

minus

select * from table_name

where rownum < N;

Example:

select * from employee a

where rownum <= N

minus

select * from employee

where rownum < N;

Comments