Oracle的分页查询sql语句

Oracle的分页查询sql语句写法:

select * from (select rownum as rn,tmp.* from ("+sql+")tmp) where rn BETWEEN "+starnum+" AND "+endnum

例如 :

select * from (select rownum as rn,tmp.* from (select * from users)tmp) where rn BETWEEN 1 AND 10
正在加载评论...