oracle 中调用 store procedure[@more@]1 Create or replace procedure ex_ref(v_cur IN OUT sys_refcursor)
2 as
3 Begin
4 open v_cur for select first_name from emp where rownum<3;
5* end;
SQL> /
Procedure created.
SQL> var c1 refcursor
SQL> exec ex_ref(:c1);
PL/SQL procedure successfully completed.
SQL> print c1
FIRST_NAME
--------------------
Donald
Douglas
2 as
3 Begin
4 open v_cur for select first_name from emp where rownum<3;
5* end;
SQL> /
Procedure created.
SQL> var c1 refcursor
SQL> exec ex_ref(:c1);
PL/SQL procedure successfully completed.
SQL> print c1
FIRST_NAME
--------------------
Donald
Douglas
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/66634/viewspace-847857/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/66634/viewspace-847857/