17,086
社区成员
发帖
与我相关
我的任务
分享
OPER@TL>select select * from test;
AAA BBB
---------- ----------
1 1
2 2
3 3
3 10
OPER@TL>create or replace procedure test_p(in_var number,out_var out sys_refcursor)
2 as
3 begin
4 open out_var for select * from test where aaa=in_var;
5 end;
6 /
Procedure created.
OPER@TL>var abc refcursor
OPER@TL>exec test_p(3,:abc)
PL/SQL procedure successfully completed.
OPER@TL>print :abc
AAA BBB
---------- ----------
3 3
3 10
OPER@TL>