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

Home -> Community -> Usenet -> c.d.o.server -> Re: Update triggers - can you detect columns not being updated?

Re: Update triggers - can you detect columns not being updated?

From: John Verbil <jverbil_at_netmail.mnet.uswest.com>
Date: 1997/01/07
Message-ID: <32D2D605.6E1C@netmail.mnet.uswest.com>#1/1

John Mara wrote:
>

 <snip>
>
> We would like the application to supply these values, and have the trigger
> supply them if the tables are updated outside of the application.
<snip>

Why not have the trigger supply the values in both cases? It seems that you'd be duplicating code and going to a lot of unnecessary effort by having this test in the trigger to see if the values were changed before deciding whether or not to put your own audit values in.

Besides, if you're looking for a true audit trail, and your trigger only updates the user ID when the firing statement did not, I could put you off the trail using SQL*Plus by putting someone else's user ID in my update statement. If you have the trigger supply USER (and SYSDATE), you can be much more confident that your audit trail is correct.

-- 
John Verbil
U S WEST Communications
Information Technologies
jverbil_at_uswest.com
(303) 896-0916
Received on Tue Jan 07 1997 - 00:00:00 CST

Original text of this message

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