读书人

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

发布时间: 2012-07-26 12:01:08 作者: rapoo

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的记录 

读书人网 >asp.net

热点推荐