Re: Help for an Oracle Newbie
Date: Mon, 25 Aug 2008 07:37:56 +0200
"DA Morgan" <damorgan_at_psoug.org> schreef in bericht
> Shakespeare wrote:
>>> If it is NOT NULL then it will not be equal to the previous value.
>> O yes it can be, if a user selects a record and updates some columns
>> except lastupdated. (E.g. using Oracle Forms: query a record, update and
>> In that case lastmodified will not be updated, where the record was
> An AFTER UPDATE trigger without an OF clause will fire no matter what is
> or is not updated.
> Daniel A. Morgan
> Oracle Ace Director & Instructor
> University of Washington
> damorgan_at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Group
That is correct, but this one is not:
> If it is NOT NULL then it will not be equal to the previous value.
An application like Oracle Forms can send all columns to the update statement, even if there not updated (I think to remember you have to set a preference like UPDATE_CHANGED_COLUMNS to avoid this). But your trigger will fire in that case, so it's not a real issue.
The problem is in when the lastupdated column is changed by hand (suppose someone puts in a Forms trigger as well, setting lastupdated to some incorrect value). Your trigger will fire, but won't change the lastupdated column to the correct value.
Shakespeare Received on Mon Aug 25 2008 - 00:37:56 CDT