PL/SQL中动态掉用存储过程:
[@more@]
SQL> set serverout on
SQL> create or replace procedure p_test(a in varchar2,b in varchar2,c out varchar2)
2 is
3 begin
4 c := a||b;
5 end p_test;
6 /
Procedure created
SQL> declare
2 v_sql varchar2(1000);
3 c varchar2(1000);
4 begin
5 v_sql:='begin p_test(:v1,:v2,:v3); end;';
6 execute immediate v_sql using in '1',in '2',out c;
7 dbms_output.put_line(c);
8 end;
9 /
12
PL/SQL procedure successfully completed
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7200614/viewspace-979426/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7200614/viewspace-979426/