create package test as
type myCursor is ref cursor;
end test;
create function geta return test.myCursor is
rc myCursor;
strsql varchar2(200);
begin
open rc for select a.user_name from fnd_user a ;
return rc;
end get;create procedure test_a(my_cur in test.mycursor) as
w_rc test.mycursor:=my_cur;
begin
open w_rc;
loop
fetch w_rc into ...
exit when w_rc%notfound;
--做处理
end loop;end;
type myCursor is ref cursor;
end test;
create function geta return test.myCursor is
rc myCursor;
strsql varchar2(200);
begin
open rc for select a.user_name from fnd_user a ;
return rc;
end get;create procedure test_a(my_cur in test.mycursor) as
w_rc test.mycursor:=my_cur;
begin
open w_rc;
loop
fetch w_rc into ...
exit when w_rc%notfound;
--做处理
end loop;end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货