Using call statement in a dynamic statement is legal
SQL>
SQL> CREATE OR REPLACE PROCEDURE CallProc1(p1 IN VARCHAR2 := NULL) AS
2 BEGIN
3 DBMS_OUTPUT.PUT_LINE('CallProc1 called with ' || p1);
4 END CallProc1;
5 /
Procedure created.
SQL>
SQL> DECLARE
2 myResult VARCHAR2(50);
3 BEGIN
4 EXECUTE IMMEDIATE 'CALL CallProc1(''Hello from PL/SQL'')';
5 END;
6 /
CallProc1 called with Hello from PL/SQL
PL/SQL procedure successfully completed.
SQL>
SQL>
Related examples in the same category