1.在分页的时候,一般会显示总页数,需要先查询总数据量得到总页数,总页数=总量/每页显示记录数
select count(*) from mse0001;
分页语句一:含order by排序,多一层嵌套,因为order by在select之后执行,不在里面写的话可能会出现不是预期的排序结果
select * from (select t.*, rownum rn from (select * from mse0001 order by F001 asc) t where rownum <= 10) where rn > 0;
通用分页格式,page是页码,size是每页显示条数
select * from (select t.*, rownum rn from (select * from mse0001 order by F001 asc) t where rownum <= page*size) where rn > (page-1)*size;