当前位置: 代码迷 >> ASP.NET >> Oracle中视图分页查询解决方法
  详细解决方案

Oracle中视图分页查询解决方法

热度:8377   发布时间:2013-02-25 00:00:00.0
Oracle中视图分页查询
我现在有一个视图 v_chaxun,里面有24条记录,以后会逐渐增加,现在要用rwonum实现分页查询,这个语句该怎么写。高手、、、

------解决方案--------------------------------------------------------
select * from (select t.*,rownum rn from t where rownum<100) where rn>90;

------解决方案--------------------------------------------------------
SQL code
with cte as(    select t.*,rownum rn    from test_tree t )  select * from cte c where c.rn >10 and c.rn<21--获取第10到20的记录
  相关解决方案