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: clear table fast ?

Re: clear table fast ?

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/01/14
Message-ID: <32DBBC85.6568@mf.sigov.mail.si>#1/1

MarkP28665 wrote:
>
> >> Original note asked for quick way to clear a table. A reply suggested
> truncate
>
> I would just like to point out that in 7.0 and 7.1.3 that only the owner a
> table may use the truncate command on a table. This is probably true
> still on 7.1.6 and up.
> (I haven't tested this since we upgraded to 7.1.6.)
>
> If you need a non-owner to be able to quickly clear a table you can create
> a database stored procedure under the table owner that uses the dbms_sql
> package to issue the truncate command. This gets around the problem.

Not quite true! Anyone who have been granted DROP ANY TABLE system privilege can truncate any table.

So you dont have to bother with procedures and dynamic SQL, unless you want to restrict use of such powerfull privilege to a predefined set of tables.

Regards, Jure

-- 
 ===============================================================
 ! Jurij Modic                            Republic of Slovenia !
 !  tel: +386 61 178 55 14                Ministry of Finance  !
 !  fax: +386 61  21 45 84                Zupanciceva 3        !
 !  e-mail: jurij.modic_at_mf.sigov.mail.si  Ljubljana 1000       !
 ===============================================================
Received on Tue Jan 14 1997 - 00:00:00 CST

Original text of this message

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