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: Fengqing Zhou <zhouf_at_rintintin.Colorado.EDU>
Date: 1997/01/06
Message-ID: <5arclo$f6p@lace.colorado.edu>#1/1

In article <59nobg$8ra_at_maureen.teleport.com>, Jonathan W. Ingram <jingram_at_teleport.com> wrote:
>"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
>
>

also
TRUNCATE is a DDL, not DML. Therefore, you may ned to use: dbms_sql Received on Mon Jan 06 1997 - 00:00:00 CST

Original text of this message

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