create or replace package mypack
as
type cursor testCursor is ref cursor;
end mypack;
create or replace procedure fenye
(tableName in varchar
is
declare
v_sql varchar
v_begin number := (pageNow
v_end number := pageNow * pageSize;
begin
v_sql :=
open p_cursor for v_sql;
v_sql :=
execute immediate v_sql into rows;
pageCount := (rows + pageSize
close p_cursor;
end;
From:http://tw.wingwit.com/Article/program/Oracle/201311/18125.html