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: procedure and ddl commands?

Re: procedure and ddl commands?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Mon, 26 Jul 2004 06:46:04 -0700
Message-ID: <1090849594.565468@yasure>


dead wrote:

> Can someone help me.
> I wolud like to make procedure on server with creating tables, sequences and
> indexes.
> 1. can I put ddl commands in oracle procedures?
> 2. how to put create sequnce command with 'start with' value as result of
> 'select command' (I need max value +1 from table for next value of
> sequence) in procedure?

As Mark indicates ... with EXECUTE IMMEDIATE ... what is known as Native Dynamic SQL.

But the fact that you can does not mean you should. And in almost 100% of cases ... you absolutely should not.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Jul 26 2004 - 08:46:04 CDT

Original text of this message

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