declare
type t_sor is ref cursor;
v_sor t_sor;
str varchar2(50);
begin
str:='select '||xxx||' from yyy';
open v_sor for str;
loop
fetch v_sor into value;
when v_sor%notfound then exit;
dbms_output.put_line(value);
end loop;
end;
/
type t_sor is ref cursor;
v_sor t_sor;
str varchar2(50);
begin
str:='select '||xxx||' from yyy';
open v_sor for str;
loop
fetch v_sor into value;
when v_sor%notfound then exit;
dbms_output.put_line(value);
end loop;
end;
/
http://expert.csdn.net/Expert/topic/2257/2257817.xml?temp=.5137751
拿分。