Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Looping in SQL
Hi!
DDL statements are not allowed directly in PLSQL. You must use DBMS_SQL (or possibly the new solution in 8i).
What kind of failures do you expect?
Frank
A test:
BEGIN ALTER TABLE test ADD col3 NUMBER;
EXCEPTION
WHEN OTHERS THEN
ALTER TABLE
END;
/
compiles to:
ALTER TABLE test ADD col3 NUMBER;
*
ERROR at line 3:
ORA-06550: line 3, column 4: PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
![]() |
![]() |