支持排序功能的oracle分页

SELECT * FROM( 
  SELECT A.*,ROWNUM num FROM 
  (SELECT * FROM product_user_comment order by user_id) A 
  WHERE 
  ROWNUM<=1550) 
WHERE num>=5 


如果要排序功能要写三层


select * 
from(select rownum rn,empno,ename from emp where rownum<=10 order by empno) temp
where temp.rn>5;

你可能感兴趣的:(java,oracle)