---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;
exec procedure proc_PageSize 1,10
创建的时候报PLS-00428:在此select语句中缺少INTO子句,求oracle高手指点,因为从事NET开发Oracle用的很少,最近
一个项目用oracle,语法和sql还是有很大区别,求解决!
------解决方案--------------------
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;
------解决方案--------------------
代码迷推荐解决方案:oracle存储过程,http://www.daimami.com/search?q=177537