关键字:execute immediate sqlName using in '1',in '2' ,out c ;
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
/************************************************/
Specifying Parameter ModesWith the USING clause, you need not specify a parameter mode for input bind arguments because the mode defaults to IN. With the RETURNING INTO clause, you cannot specify a parameter mode for output b