SQL> create or replace package Test is
2 type mycursor is ref cursor; -- 定义游标变量
3 procedure GetRecord(r_c out mycursor); -- 定义过程,用游标变量作为返回参数
4 end TestPackage;
5 /SQL> create or replace package body Test is
2 procedure GetRecord(r_c out mycursor) as
3 begin
4 open rcursor for select nvl(pathname,' ') from t1,t2 where t1.crc=t2.crc(+);
5 end GetRecords;
6 end TestPackage;
7 /