Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Update triggers - can you detect columns not being updated?
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-0916Received on Tue Jan 07 1997 - 00:00:00 CST