CREATE OR REPLACE PACKAGE "TZH"."EMPLOYEES" AS
TYPE empcur IS REF CURSOR;
PROCEDURE GetEmpRecords(p_cursor OUT empcur);
END Employees;
/
CREATE OR REPLACE PACKAGE BODY "TZH"."EMPLOYEES" AS
PROCEDURE GetEmpRecords(p_cursor OUT empcur) IS
BEGIN
OPEN p_cursor FOR
SELECT *
FROM person
;
END GetEmpRecords;
END Employees;
/
CSDN上问了半天没人会的说。又是一个结分不爽的贴
======其实只要如下=====
var c refcursor
execute tzh.employees.getemprecords(:c)
print c