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: Question: Use Trigger to Prevent Deletes with no Where Clause?

Re: Question: Use Trigger to Prevent Deletes with no Where Clause?

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 14 Jan 2005 04:50:52 -0800
Message-ID: <115707052.0000763d.091@drn.newsguy.com>


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

  1. understanding it
  2. testing it
-- 
Thomas Kyte
Oracle Public Sector
http://asktom.oracle.com/
opinions are my own and may not reflect those of Oracle Corporation
Received on Fri Jan 14 2005 - 06:50:52 CST

Original text of this message

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