TRIGGER HELP [message #63] |
Wed, 09 January 2002 17:11  |
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  |
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.
|
|
|