Hi Bill
Address is never NULL and I want to update the who_modified and when_modified fields with user and sysdate whenever there is change in address value.
I have a test database which is a copy of the live database.
I am trying the following scripts on test database.
ALTER TABLE
EMPLOYEE
add (who_created varchar(30), when_created date );
ALTER TABLE
EMPLOYEE
modify (who_created default user, when_created default sysdate );
ALTER TABLE...
hi Mufasa
I am using an application to insert/update record in table.
The same SAVE button is used to create or update employee record.
When I change and save the address, it shows the updated address but modifydate field still NULL.
I see no error message while executing trigger.
Please advise,
create or replace trigger modifyemployee
after update of address on employee
begin
update employee set modifydate=sysdate
// i can't figure out the code to go over here
end;
thanks
Hi
I want to capture the system date into 'modifydate' field in my 'employee' table whenever there is change in the value of the 'address' field of the 'employee' table.
Looking for a trigger for this task.
I am using Oracle 9i
Thank you
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.