Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Database Trigger Confusion
I have created a trigger on a table to write information to a history table, and I've run into some behavior that's confusing me...some clarification would be greatly appreciated.
My trigger code is as follows:
CREATE OR REPLACE TRIGGER endb.budget_total_amt_hist_trg
BEFORE UPDATE of total_amt_auth, expiration on endb.budget FOR EACH ROW BEGIN <code_to_rollover_data_to_history_table> END;
Now my confusion lies in the fact that the trigger is supposed to fire ONLY when either the total_amt_auth column OR the expiration column gets updated. Now, of course it works fine when we update either of those columns. But the problem/confusion is why is it also firing when we update other fields in the table also?? If we update any column other than those two the trigger still fires. What am I doing wrong or missing/forgetting???
-::YEX::-
Robert D. Yexley, SSgt
Air Force Institute of Technology
Applications Services Division (SCA)
Oracle DBA & Programmer
<)))><
robert.yexley_at_afit.edu
DSN - 785-6565 x-4268
Commercial - (937) 255-6565 x-4268
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Yexley Robert D SSgt AFIT/SCA INET: Robert.Yexley_at_afit.edu Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu May 24 2001 - 11:43:55 CDT
![]() |
![]() |