Hi,
Try to answer the following question.
Is it possible to create a trigger using “CREATE OR REPLACE TRIGGER TRIGGER_NAME”, where the trigger_name is already being used by another trigger under some other table ?. If your answer is YES, then this article may help you.
The following code will give you some more clarity on the above explanation:
before insert on trig1
null;
end;
/
before insert on trig2
null;
end;
/
*
ERROR at line 1:
ORA-04095: trigger 'TRG_TRIG1' already exists on another table, cannot replace
It
Thus the above code creates two table called trig1 and trig2. Trig1 has a before insert trigger called trg_trig1.Then we have the code for trg_trig1 trigger on trig2. Oracle doesn’t allow you to create the trigger by raising ORA-04095 exception.