You need to create a trigger on the EMP table that monitors every row that is changed and places this information into the AUDIT_TABLE.
What type of trigger do you create?
A.
FOR EACH ROW trigger on the EMP table.
B.
Statement-level trigger on the EMP table.
C.
FOR EACH ROW trigger on the AUDIT_TABLE table.
D.
Statement-level trigger on the AUDIT_TABLE table.
E.
FOR EACH ROW statement-level trigger on the EMPtable.
Explanation:
A FOR EACH ROW trigger on the EMP table will fire for each row that is modified in the employee table and will insert a record in the AUDIT_TABLE for each corresponding row modified in the EMP Table. A Statement-level trigger will only fire once and could only be used to insert a single row into the AUTIT_TABLE.
Incorrect Answers
B: Would only insert one row into the AUDIT_TABLE and could not reference the :OLD &: NEW qualifies. Therefore you could not track the changes made to the EMP Columns, you could only log that an update was performed on the table.
C: The trigger should be based on the UPDATE Event of the EMP Table.
D: Incorrect Trigger Type on the wrong table
E: Incorrect Trigger Type