Home » SQL & PL/SQL » SQL & PL/SQL » TRIGGER HELP
TRIGGER HELP [message #63] Wed, 09 January 2002 17:11 Go to next message
Jan MAREK
Messages: 2
Registered: January 2002
Junior Member
Why does this not work ?
CREATE OR REPLACE TRIGGER zakaznici_vymaz
BEFORE DELETE ON honza.zakaznici
FOR EACH ROW
BEGIN WHEN((SELECT stav FROM honza.objednavka)=0)
DELETE FROM honza.objednavka
WHERE (id_zak = :old.id_zak);
END zakaznici_vymaz;
I use Oracle 8.1.7

I need delete from table honza.objednavka only if the column "stav" (is in the table honza.objednavka) has the 0 value.
Thanx
Re: TRIGGER HELP [message #94 is a reply to message #63] Sun, 13 January 2002 10:09 Go to previous message
Vishnu Bhavaraju
Messages: 6
Registered: January 2002
Junior Member
this causes an error called a mutating table error .
a trigger cannot acces the table on which it is created , except for the :old and :new values.
Previous Topic: Re: 8.1.5 data encryption
Next Topic: oracle user_views.
Goto Forum:
  


Current Time: Thu Mar 28 18:23:34 CDT 2024