oracle存储过程返回集合
--包头
create or replace package pkg_test
as
type myCursor is ref cursor;
end pkg_test;
create procedure list_early_deaths(refcursor_name out pkg_test.myCursor) as
toesup pkg_test.myCursor;
begin
open toesup for
SELECT poets.name, deaths.age
FROM poets, deaths
WHERE poets.id = deaths.mort_id
AND deaths.age < 60;
return toesup;
end;