Re: Deleting all rows from a table

From: AMARENDRA B NETTEM <nettama_at_charlie.acc.iit.edu>
Date: 1996/06/16
Message-ID: <31C413B8.41E1_at_charlie.acc.iit.edu>#1/1


Bharat Kumar wrote:
>
> I'm writing a PL/SQL procedure that requires the use of a couple of temporary
> tables. Currently, I've created those temp. tables outside the procedure,
> and inside the procedure, after I'm done with the main work, I delete all
> the rows in those temp tables (required for subsequent invocations of the
> procedure). I would like to use something similar to a "truncate" command,
> since the "delete from temp_table" command takes a long time. However, I
> can't put the truncate command directly into the procedure. Any suggestions?
>
> Here's the psuedocode for the procedure:
>
> procedure blah
> insert into temp_table (subquery...)
> ... select/project/join queries on the temp_table
> delete from temp_table;
> end blah;
>
> Please post replies to this newsgroup.
>
> Thanks,
> -Bharat
>
> -------------------------------------------------------------------------------
> Disclamer: My opinions are mine alone, and no one else can have them.

try using DBMS_SQL package;
check ORACLE PL/SQL book by STEVEN FEUERSTEIN (page 21)

AMARENDRA

-- 
	AMARENDRA B NETTEM
        PH.No. (312)945-2116
        HOMEPAGE:  http://www.iit.edu/~nettama
	E-MAIL  :  nettama_at_charlie.acc.iit.edu
Received on Sun Jun 16 1996 - 00:00:00 CEST

Original text of this message