Hi, all
Does anybody have a trigger on certain tables' update and delete actions. the column would contain the Oracle User id, O/S id,time the data changed. Thanks for help.
Dragon
Printable View
Hi, all
Does anybody have a trigger on certain tables' update and delete actions. the column would contain the Oracle User id, O/S id,time the data changed. Thanks for help.
Dragon
No problem with update. But with delete, I can not see where do you want the information to be written to! The row will not exist any more, so where would you append your information about the user and the deletion date to? Unless you want to save the row to another archive table before it gets deleted from the actual table?
For update:
CREATE OR REPLACE emp_bur_trigger ON scott.emp BEFORE UPDATE FOR EACH ROW
BEGIN
--:NEW.update_user := USER;
--:NEW.update_date := SYSDATE;
END;