The stored procedure in the ORACEL package needs to define a cursor variable in the package to return the result set, and the stored procedure uses this variable to return the result set.
Examples are as follows:
Bag
create or replace package TEST_PACKAGE is
TYPE MY_CURSOR IS REF CURSOR;
procedure Account_Check(
Comp varchar, --公司号
ret out MY_CURSOR
);
end TEST_PACKAGE;
Inclusion
create or replace package body TEST_PACKAGE is
procedure Account_Check(
Comp varchar, --公司号
ret out MY_CURSOR
)
as
open ret for SELECT * FROM XXX;
end ;
end TEST_PACKAGE;