------解决方案-------------------- >create or replace procedure test_p(in_var number,out_var out sys_refcursor) >as >begin >open out_var for select * from test where aaa=in_var; >end; >/
Procedure created.
>var abc refcursor >exec test_p(3,:abc)
PL/SQL procedure successfully completed.
>print :abc
返回多行查询数据
------解决方案-------------------- create or replace procedure proAA(out_var out sys_refcursor) as begin open out_var for select * from table1; end;
调用 declare v_out sys_refcursor; begin proAA(v_out); end;