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: Vijay Vardhineni <vardhineni_at_worldnet.att.net>
Date: 1997/01/04
Message-ID: <01bbfa01$9a2d6c40$056993cf@default>#1/1

You may want to make use of :old and :new values in your trigger script. :old.column_name indicates the old value of the column and :new.column_name  indicates the new value of the column. If :old.column_name value and :new.column_value both are same, i.e the user didn't modified this column value.

-- 
Vijaya Kumar Vardhineni
Oracle DBA, EDS
Plano, TX

John Mara <john.mara_at_conncomp.com> wrote in article
<5ags6e$4gu_at_news.mr.net>...

> Greetings, salutations and Happy New Year! I have a question for those of
you
> versed in Oracle update triggers. We are building an application that
> maintains tables, with each table containing two audit columns. One
column
> contains a user id of who updated it last, another contains the date and
time
> of the update.
>
> We would like the application to supply these values, and have the
trigger
> supply them if the tables are updated outside of the application. To do
that,
> we need to detect if these two columns are included within an update
statement.
> Therein lies the problem. With an update statement, any columns that are
not
> supplied in remain unchanged. We haven't found a way to detect if the
columns
> are used?
>
> Any suggestions? Thanks!
>
>
Received on Sat Jan 04 1997 - 00:00:00 CST

Original text of this message

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