Oracle
 sql >> Base de Dados >  >> RDS >> Oracle

Selecione a enésima linha de uma tabela no Oracle


Com base na resposta clássica:

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:127412348064
select * 
  from ( select a.*, rownum rnum
           from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
          where rownum <= N_ROWS )
 where rnum >= N_ROWS
/