Oracle triggers if updating performance

Posted by / 26-Nov-2017 15:28

: PARENT.dname); END; / set serveroutput on UPDATE TABLE ( SELECT FROM dept_or p WHERE deptno = 10) SET ename = LOWER(ename); ON ov_empdept FOR EACH ROW BEGIN INSERT INTO emp (empno, ename, job, mgr, hiredate, sal, comm, deptno) VALUES (: NEW.empno, : NEW.ename, : NEW.job, : NEW.mgr, : NEW.hiredate, : NEW.sal, : NEW.comm, : deptno); INSERT INTO dept (deptno, dname, location) VALUES (: deptno, : dname, : location); END ioft_ov_empdept; / INSERT INTO ov_empdept (empno, ename, dept) VALUES (4, 'D.

you cannot dynamically access them, only 'statically'. As usual, you do a great job of answering them and I greatly appreciate your insights.I especially love the rants about barnyard database design. The developers are programmaticaly generating the audit table ddl and triggers for each audited table from the Rose Object Model they are using.I have read the entire thread above and found it very useful, but I have a question about how to find out what value(s) changed in a row by examining audit trail records. These are simple audit triggers, such that all inserts, updates, and deletes result in the entire row being inserted into an audit table that has all of the production table columns.With UPDATING() call we have the record in audit table for each record.By using audit table we can get info about the actual UPDATE event (who, when and etc.) updated this column for ANY record.

oracle triggers if updating performance-33oracle triggers if updating performance-79oracle triggers if updating performance-62

With :new.value:old.value (plus NULL checking) approach we have this data only for records that have this column changed and we are loosing UPDATE EVENT by some user. As for me its better to have MORE data in audit table.