create package test_age
as
type mycursor is ref cursor;
end;
/
CREATE OR REPLACE FUNCTION get_all
return test_age.mycursor
IS
v_rc test_age.mycursor;
begin
open v_rc for SELECT name FROM mytbl;  
end;
/