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 <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