Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Q: triggers update on "column"

Q: triggers update on "column"

From: <norman.mueller_at_deteline.de>
Date: Mon, 06 Mar 2000 15:26:06 GMT
Message-ID: <38c3bfe3.24340539@news.deteline.de>


Hello,

i have a question about triggers. i simply want to create a trigger which creates an entry in a table when the value of one - and only this one - column in another table was altered.

CREATE OR REPLACE TRIGGER "TRIGGERNAME" BEFORE INSERT OR UPDATE OF "Col22" ON "TABLE1" FOR EACH ROW
...
insert into table2 (c1,c2,c3) values
(:new.col22,:new.col23,:old.col24);
....

After saving the trigger i can see in the schema-manager that the trigger also fires on changes of col23 and col24 in table1. I can avoid this behaviour with adding an if-statement

if :new.col22<>:old.col22 then insert...

I wonder if it is a normal behaviour of oracle that it adds all columns that are used in the definition of the trigger in "fire on list". I read the documention but i didn't find a note about this.

Norman Received on Mon Mar 06 2000 - 09:26:06 CST

Original text of this message

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