可以将游标集作为传出参数:
function FinCheckLog_list(cur_finchecklog_list out sys_refcursor)
return number is
begin
open cur_FinCheckLog_list for
select * from sqlStr;
return 0;
exception
when others then
return -1;
end;
我用oracle9i写的过程:
create or replace procedure p_get_goodslist
(p_spell_code in varchar2,
p_goodlist out sys_refcursor)
is
begin
open p_goodlist for
select uscode, ypname from t_medicare_ypalia where spell_code like p_spell_code||'%'
union all
select uscode, ypname from t_medicare_zypalia where spell_code like p_spell_code||'%';