CREATE OR REPLACE Function get返回页数
(
行号_In number,
每页行数_In number
) Return Varchar2
Is
v_序号 number;
i number;
Begin
select ceil(行号_In/每页行数_In) into i from dual;
select 0 into v_序号 from dual;
while v_序号=0 and 行号_In is not null loop
select 页号 into v_序号 from (
select case when 行号_In<=(i*每页行数_In) and 行号_In >((i–1)*每页行数_In) then i else 0 end as 页号 from dual);
i:=i+1;
end loop;
return v_序号;
End get返回页数;
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/197364.html