分页框架1:
select b.*
from (select rownum rn, rid
from (select rowid rid
FROM tab_test
order by CREATETIME DESC
)
where rownum <1020
) a,
tab_test b
where rn >=1000
and b.rowid = a.rid;
分页框架2:
select *
from (
select *
from (
select a.*,rownum rn
from page a
where object_id > 1000 and owner = 'SYS'
order by object_id desc
)
where rownum<=20
)
where rn>=0;
阅读(427) | 评论(0) | 转发(0) |