Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: DDL in PL/SQL

Re: DDL in PL/SQL

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Thu, 3 Jun 1999 12:24:00 +0100
Message-ID: <37566389.0@145.227.194.253>


You cannot use DML inside a PL/SQL procedure.

Try using DBMS_SQL or DBMS_DDL and pass your statement via that.

Mark

dennishancy_at_eaton.com wrote in message <7j1enh$hqa$1_at_nnrp2.deja.com>...
>
>
>I have a PL/SQL block that looks like the following:
>
>-----------
>declare
> <some variables declared>
>begin
> drop table x;
> create table x
> ( etc, etc, etc...);
> <some DML statements>
>end;
>-----------
>
>When I try to run this, it complains about the "drop" statement. If I
>comment that out, along with the "create" statement, all goes well. Can
>I not use DDL statements in a PL/SQL block like this? Thanks..
>
>
>Dennis Hancy
>Eaton Corporation
>Cleveland, OH
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Thu Jun 03 1999 - 06:24:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US