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: How to prevent deletes when DELETE ANY TABLE granted?

Re: How to prevent deletes when DELETE ANY TABLE granted?

From: P S Sriram <gsriram_at_ix.netcom.com(P>
Date: 1996/12/15
Message-ID: <5914vt$3kv@sjx-ixn6.ix.netcom.com>#1/1

Create or Replace Procedure TRNC_TABLE (TAB_NAME IN VARCHAR2) AS   ch integer;
Begin

   ch := dbms_sql.open_cursor;
   dbms_sql.parse (ch,'truncate table '||tab_name,dbms_sql.v7); End;
/
SQL> SELECT COUNT(*) FROM STOCKS2;

 COUNT(*)                                                              
                            

---------
328

SQL> EXECUTE TRNC_TABLE ('STOCKS2'); PL/SQL procedure successfully completed.

SQL> SELECT COUNT(*) FROM STOCKS2;

 COUNT(*)                                                              
                            

---------
0

SQL> SPOOL OFF Received on Sun Dec 15 1996 - 00:00:00 CST

Original text of this message

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