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 -> Table with trigger mutation

Table with trigger mutation

From: Valentine Pogrebinsky <pva_at_azovimpex.donetsk.ua>
Date: Mon, 7 Dec 1998 11:08:47 +0200
Message-ID: <74g5vg$33j$1@hyppo.anet.donetsk.ua>


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

Original text of this message

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