Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question: Use Trigger to Prevent Deletes with no Where Clause?
It's an interesting trick to know!
But let's hope the OP won't use this script without modification if the name of his table contains the string "where" =)
SQL> rename t to aMadCowThere;
Table renamed.
SQL> delete from aMadCowThere;
delete from aMadCowThere
*
ERROR at line 1:
ORA-20000: you totally lose ORA-06512: at "SCOTT.T_TRIGGER", line 14 ORA-04088: error during execution of trigger 'SCOTT.T_TRIGGER'
SQL> rename aMadCowThere to aMadCowHere;
Table renamed.
SQL> delete from aMadCowHere;
7 rows deleted.
Vitalis
-- Message posted via http://www.oraclemonster.comReceived on Fri Jan 14 2005 - 06:30:43 CST