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: drop any table vs. delete any table

Re: drop any table vs. delete any table

From: Al <al_at_work>
Date: 1998/02/27
Message-ID: <6d6ma8$hul4@piper.ncr.pwgsc.gc.ca>#1/1

If you don't like granting such privileges, you can encapsulate the truncate statements into a stored procedure, and simply grant EXECUTE

CREATE OR REPLACE PROCEDURE sp__trunc_tabs AS

cursor_1 integer;
ignore integer;

BEGIN

   cursor_1 := dbms_sql.open_cursor;

   dbms_sql.parse(cursor_1,'truncate table tb__junk',dbms_sql.v7);    ignore := dbms_sql.execute(cursor_1);

   dbms_sql.close_cursor(cursor_1);

END;
/ Received on Fri Feb 27 1998 - 00:00:00 CST

Original text of this message

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