SQL> CREATE OR REPLACE PROCEDURE execDDL (ddl_string IN VARCHAR2)
2 AUTHID CURRENT_USER IS
3 BEGIN
4 EXECUTE IMMEDIATE ddl_string;
5 EXCEPTION
6 WHEN OTHERS
7 THEN
8
9 DBMS_OUTPUT.PUT_LINE ('Dynamic SQL Failure: ' || SQLERRM);
10 DBMS_OUTPUT.PUT_LINE (' on statement: "' || ddl_string || '"');
11
12 RAISE;
13 END;
14 /
Procedure created.
SQL>
SQL>
|