简单的oracle分页语句



select * from(select a.*, rownum rn from (select * from table_name) a where rownum <= 5) where rn >= 2
需要注意的是,上面的分页语句,大的数字必须在前面,小的必须在后面,否则查询不了数据,至于为什么,我也不知道 ^_^

select * from(select a.*, rownum rn from (select * from table_name) a)where rn between 2 and 4

你可能感兴趣的:(分页)