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: Clark E. Morrow <cemorrow_at_kodak.com>
Date: 1997/01/07
Message-ID: <01bbfc30$7e0e5980$17d36796@kp-w002508>#1/1

John Mara <john.mara_at_conncomp.com> wrote in article <5ags6e$4gu_at_news.mr.net>...
> 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 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!
>

The trigger below will only fire if column "col1" or "col2" is updated.

CREATE TRIGGER t1
  AFTER UPDATE OF col1, col2 ON tablename   FOR EACH ROW
  <rest of trigger syntax>

Regards,

Clark Morrow
Eastman Kodak
e-mail: cemorrow_at_kodak.com Received on Tue Jan 07 1997 - 00:00:00 CST

Original text of this message

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