对于存储过程可以直接反键test
但是对于函数就要先在过程中调用,然后测试
例子:
CREATE OR REPLACE PROCEDURE erik_test(str_code out varchar2) is
a_strSql varchar2(256);
ncount integer :=0;
begin
a_strSql := ' select count(1) from table(
F_ZTDOMESTICDEMANDAUDITS(null ,null ,null ,null ,null ))';
-- DBMS_OUTPUT.PUT_LINE(substr(a_strSql_Org,1,40));
execute immediate a_strSql into ncount;
exception
when others then
str_code := sqlerrm;
end erik_test;
利用execute immediate 执行sql中的函数,然后测试,一步一步进入function中,就可以达到测试的目的了,若果函数名可以动态获取,就可以叫动态的调用具体的存储过程了
pl-sql中关于函数test及存储过程中调用function函数
猜你喜欢
转载自yunqiang-zhang-hotmail-com.iteye.com/blog/1396603
今日推荐
周排行