Oracle 存储过程 例子~!

 

SQL code
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>
posted on 2008-10-27 21:22  lhx  阅读(771)  评论(0编辑  收藏  举报