Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Need info on Triggers
PKA wrote:
> for all columns. for ex: I need to capture updates for column x, but not
> for columns y & Z. I also need to capture deletes from the table.
> I know that i have to write a trigger to capture changes to the table.
> my question is wether one trigger is enough to capture changes to
> various columns or i need one trigger each to capture changes.
> please advise. any additional input on triggers is welcome
You can use a single trigger like
ON delete or update on x,y,z
if deleting then ...
if updating then ...
if :new.x <> :new.y then ...
--- Name : Lun Wing San Title : Oracle Application Developer of Hong Kong Productivity Council Oracle Database Administrator and System Administrator of QRC Phone : (852)27885841 This posting represents the personal opinions of the author. It is not the official opinion or policy of the author's employer. Warranty expired when you opened this article and I will not be responsible for its contents or use.Received on Fri Feb 14 1997 - 00:00:00 CST