Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: using truncate in oracle7 procedures
"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