Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Table with trigger mutation
I have two tables
CREATE TABLE Obj(
Obj_ID NUMBER(10, 0) NOT NULL PRIMARY KEY
) ;
CREATE TABLE Org(
Org_ID NUMBER(10, 0) NOT NULL PRIMARY KEY
) ;
ALTER TABLE Org ADD CONSTRAINT RefObj1
FOREIGN KEY (Org_ID)
REFERENCES Obj(Obj_ID);
When I delete from ORG record with ORG_ID, I need to delete from OBJ record with OBJ_ID equal ORG_ID (Right this way - detail-master). The trigger is
CREATE OR REPLACE TRIGGER DELORGFROMOBJ
AFTER DELETE ON ORG
FOR EACH ROW
BEGIN
DELETE FROM OBJ
WHERE OBJ_ID = :OLD.ORG_ID;
END;
This trigger raise exception "ORA-04091 Table ORG is mutaiting,
trigger/function may not see it." But I really need this way modification of
both tables
Thanks for any help.
Valentine Pogrebinsky Received on Mon Dec 07 1998 - 03:08:47 CST