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

Home -> Community -> Usenet -> c.d.o.server -> Re: dynamic DML statements in stored procedures

Re: dynamic DML statements in stored procedures

From: Daniel Clamage <dclamageNOSPAM_at_telerama.com>
Date: 3 Jul 1998 15:35:05 -0400
Message-ID: <01bda68f$811b0e10$4b29c9cd@saturn>


>>How is this possible as you never call dbms_sql.execute? DDL statements are executed immediately when parsed. DML and SQL statements, as well as dynamic PL/SQL, must be parsed and executed. --
- Dan Clamage
http://www.telerama.com/~dclamage
If you haven't crashed the Server,
you haven't been trying hard enough.

Paul Yee <yobble_at_ihug.co.nz> wrote in article <1dbmp8d.1bu2awfwomoceN_at_p45-max8.wlg.ihug.co.nz>...
> ...
>
> > >-- create or replace procedure ptest
> > >-- as
> > >declare
> > > TblStatement varchar2(32000);
> > > c integer ;
> > >begin
> > > TblStatement := 'CREATE TABLE TTEST (CTEST VARCHAR2(30))' ;
> > > c := dbms_sql.open_cursor;
> > > dbms_sql.parse(c, TblStatement, dbms_sql.v7) ;
> > > dbms_sql.close_cursor(c);
> > >end ;
> > >/
> > >
> > >and I run it as an anoymous PL/SQL block, it works !
> > >
> > >SQL> start ptest
> > >
> > >PL/SQL procedure successfully completed.
> > >
> > >SQL> desc ttest
> > > Name Null? Type
> > > ------------------------------- -------- ----
> > > CTEST VARCHAR2(30)
> > >
>
> How is this possible as you never call dbms_sql.execute?
>
> Paul
>
>
Received on Fri Jul 03 1998 - 14:35:05 CDT

Original text of this message

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