| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: clear table fast ?
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
![]() |
![]() |