日期:2014-05-17 浏览次数:20953 次
create or replace procedure app_test( sql1 IN VARCHAR2 ) as v_sql varchar2(500); nber NUMBER; begin v_sql:=sql1; execute immediate v_sql; nber := SQL%ROWCOUNT; commit; dbms_output.put_line (nber); end app_test;
------解决方案--------------------
create or replace procedure app_test( sql1 IN VARCHAR2,nber out NUMBER
)
as
v_sql varchar2(500);
begin
v_sql:=sql1;
execute immediate v_sql;
nber := SQL%ROWCOUNT;
commit;
dbms_output.put_line (nber);
end app_test;
调用时,nber为存储过程的参数。