Skip to Main Content

How do I change the name of the auto generated trigger on the arc.

SramAug 25 2011 — edited Sep 7 2011
How do I change the name of the auto generated trigger on the arc?

I have 2 triggers that have been auto generated as below. I would like to change the names to conform to our naming standards.

Thanks!
Sabina

CREATE OR REPLACE TRIGGER ARCI1_TMR_HISTOL
BEFORE INSERT ON TMR_HISTOL
FOR EACH ROW
DECLARE i NUMBER;
BEGIN
i:=0;
IF :new.HISTOL_VAR_KEY IS NOT NULL THEN
i:= i+1;
END IF;
IF :new.HISTOL_KEY IS NOT NULL THEN
i:= i+1;
END IF;
IF (i>1) THEN
raise_application_error(-20223,' Arc constraint on table TMR_HISTOL is violated - one value is permitted in FKs');
END IF;
END;
/

CREATE OR REPLACE TRIGGER ARCU1_TMR_HISTOL
BEFORE UPDATE OF HISTOL_VAR_KEY,HISTOL_KEY
ON TMR_HISTOL
FOR EACH ROW
DECLARE i NUMBER;
BEGIN
i:=0;
IF :new.HISTOL_VAR_KEY IS NOT NULL THEN
i:= i+1;
END IF;
IF :new.HISTOL_KEY IS NOT NULL THEN
i:= i+1;
END IF;
IF (i>1) THEN
raise_application_error(-20223,' Arc constraint on table TMR_HISTOL is violated - one value is permitted in FKs');
END IF;
END;
Comments
Post Details
Added on Aug 25 2011
4 comments
1,088 views