CREATE OR REPLACE PROCEDURE proAA
IS
Begin
select * from table1;
End;
Execute proAA;
// 用什么方法实现执行后,显示这条语句(select * from table1)的所有数据出来;
在SQL SERVER2000执行存储过程后会返回多行数据的,在oracle怎么样返回多行查询数据????????
------解决方案--------------------
代码迷推荐解决方案:oracle存储过程,http://www.daimami.com/search?q=177537
------解决方案--------------------
------解决方案--------------------
>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;