Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: pl/sql - help!!
Hi Goldrich,
You can not use DDL statements in PL/SQL. The only way is
use DBMS_SQL package. Check the documentation or any PL/SQL book
for syntax( I liked "ORACLE HOW TO" book).
Hope this helps
AMARENDRA
Goldrich <goldrich_at_gateway.grumman.com> wrote in article
<32EFD21B.DC7_at_gateway.grumman.com>...
> Can't find the answer to this one in any documentation or books I have.
>
> How do I issue a create table stmt w/in a PL/SQL block in a stored proc
> implementation. The syntax for my create table is fine-- it goes
> smoothly when entered at SQLPLUS command line. Same command w/in stored
> proc produces a syntax error.
>
> PLS-00103: Encountered the symbol "CREATE" when expecting one of
> the following:
> begin declare exit for goto if loop mod null pragma raise
> return select update while <an identifier>
> <a double-quoted delimited-identifier> <a bind variable>
> <a single-quoted SQL string> << close delete fetch lock
> insert open rollback savepoint set sql commit
>
> Email replies would be greatly appreciated as I am posting this via a
> very unreliable new server.
>
> Thanks in advance.
>
Received on Fri Jan 31 1997 - 00:00:00 CST