Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Creating a Last Updated trigger
On a particular table, I would like to have a column called
"DATE_UPDATED" that notes the last time an entry was entered/modified.
The trigger before is for a BEFORE versus an AFTER which prompts a
question: If I am in a package and modify a record in the table
(which causes the Trigger to fire) but I then roll back, what will the
updated value be? The old value or the new one that the trigger
caused? Is there a way to make an AFTER trigger? It keep giving me
an error if I try.
create or replace trigger trigger_request_lastUpdated
before insert or update
on REQUEST
for each row
begin
:NEW.date_updated := SYSDATE;
END;
/
Received on Wed Jul 24 2002 - 17:13:37 CDT
![]() |
![]() |