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: using truncate in oracle7 procedures

Re: using truncate in oracle7 procedures

From: Jonathan W. Ingram <jingram_at_teleport.com>
Date: 1996/12/24
Message-ID: <59nobg$8ra@maureen.teleport.com>#1/1

"heath" <heaths_at_powerup.com.au> wrote:

>can TRUNCATE TABLE be used in database procedures? i need to regularly
>remove all rows in a quite large table and recreate the table. DELETE
>works but takes a long time ... when i put TRUNCATE in the procedure,
>compilation fails.

Hmm, you must have the ALTER TABLE privilege to perform the truncate, I believe. Compile your procedure under an account with this privilege and try again. I've done this before myself, so it should work (of course, it might depend on what version of the database you're running under as well).

Jonathan Ingram Received on Tue Dec 24 1996 - 00:00:00 CST

Original text of this message

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