Oracle 分页的存储过程 ---currIndex当前页码 pageSize每页显示的记录数 create or replace procedure proc_PageSize(currIndex in number,pageSize in number) is begin select * from (select t.*,row_number() over(order by lsh) rankid from c1_menu t order by t.lsh) c1_menu where rankid > currIndex * pageSize and rankid <= (currIndex * pageSize) + pagesize; end;
------解决方案-------------------- create or replace procedure proc_PageSize(currIndex in number,pageSize in number) is begin select * from (select *,row_number() rankid from c1_menu t order by t.lsh) c1_menu where rankid > currIndex * pageSize and rankid <= (currIndex * pageSize) + pagesize; end;
------解决方案-------------------- create or replace procedure proc_PageSize(currIndex in number,pageSize in number) is -----这里声明一个记录 begin select * into ------这里写上记录名 from (select t.*,row_number() over(order by lsh) rankid from c1_menu t order by t.lsh) c1_menu where rankid > currIndex * pageSize and rankid <= (currIndex * pageSize) + pagesize; end;