can Data Definition Language be used within a PL/SQL block or to say within the Begin/End of a procedure.
The Idea is to drop & create certain tables from within a procedure.
Printable View
can Data Definition Language be used within a PL/SQL block or to say within the Begin/End of a procedure.
The Idea is to drop & create certain tables from within a procedure.
hi
yes u can use DDL in or within the PL/SQL block
by using the PLSQL package named DBMS_SQL
best luck
pras
In 7 you have to use the package DBMS_SQL.
In 8.0 for simple DDL you can use procedure DBMS_UTILITY.EXEC_DDL_STATEMENT
In 8i you can use native dynamic SQL, with EXECUTE IMEMDIATE statement.
Read on EXECUTE IMMEDIATE statement in PL/SQL. You should be able to execute DDL statements.
Cheers
Rizwan