CREATE OR REPLACE PACKAGE pkg_test
AS
TYPE myrctype IS REF CURSOR;
END pkg_test;
/
create PROCEDURE get(p_age NUMBER, p_rc OUT pkg_test.myrctype)
IS
sqlstr VARCHAR2 (500);
BEGIN
sqlstr:='select id,name,sex,address,postcode,birthday
from student where age='||p_age;
OPEN p_rc FOR sqlstr;
END get;