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?
In article <a4e5e33c3b904fedac85feb779ebaf61_at_OracleMonster.com>, Vitalis
Pedrotti via OracleMonster.com says...
>
>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
>
It is a concept -- i would hope no one would use ANYTHING posted ANYWHERE without
-- Thomas Kyte Oracle Public Sector http://asktom.oracle.com/ opinions are my own and may not reflect those of Oracle CorporationReceived on Fri Jan 14 2005 - 06:50:52 CST