如何从Oracle中的表中选择第N行?
我试过了
SELECT PRICE FROM AAA_PRICING WHERE ROWNUM = 2
但是没有办法.请帮忙!
解决方法
基于经典答案:
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 /