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: stored procedure and table creation

Re: stored procedure and table creation

From: Tom Zamani <tomz_at_redflex.com.au>
Date: 2000/06/15
Message-ID: <8ia06c$cog$1@perki.connect.com.au>#1/1

when executing a procedure which has status of invalid oracle will recompile the procedure(s).
but why would you want to drop the table(s) and recreate them. you could leave them in the database, and when you have finished with them just do a truncate.
Or you could make all the calls to those tables dynamic.

Tom

<orauser_at_my-deja.com> wrote in message news:8i9qrl$6i0$1_at_nnrp1.deja.com...
> How do I code a stored procedure which needs to create tables
> in it (temporary tables required for processing).
>
> If I code the create table within an 'execute immediate', the
> tables do not exist at compile time, and the procedure does not
> compile.
>
> If I create the tables, compile the procedure, and then drop the
> tables so they can get recreated at runtime, the procedure is
> invalidated.
>
> What is the right way to do this? Also, do I have to use
> execute immediate for all sql execution? Or can I do selects,
> inserts and updates directly without the 'execute immediate'?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Jun 15 2000 - 00:00:00 CDT

Original text of this message

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