What happens when the user updates rows on the EMP table?

You have an AFTER UPDATE row-level on the table EMP. The trigger queries the EMP table and inserts the updating user’s information into the AUDIT_TABLE.
What happens when the user updates rows on the EMP table?

You have an AFTER UPDATE row-level on the table EMP. The trigger queries the EMP table and inserts the updating user’s information into the AUDIT_TABLE.
What happens when the user updates rows on the EMP table?

A.
A compile time error occurs.

B.
A runtime error occurs. The effect of trigger body and the triggering statement are rolled back.

C.
A runtime error occurs. The effect of trigger body is rolled back, but the update on the EMP table takes place.

D.
The trigger fires successfully. The update on the EMP table occurs, and data is inserted into theAUDIT_TABLE table.

E.
A runtime error occurs. The update on the EMP table does not take place, but the insert into the AUDIT_TABLE occurs.

Explanation:
This results in a mutating table. A mutating table is a table against which a data manipulation statement has a corresponding trigger on the DML statement is reading from the same table. When a trigger encounters a mutating table, a runtime error occurs, the effects of the trigger body and triggering statement are rolled back, and control is returned to the user or application.
Incorrect Answers

A: This trigger will be created without any compilation errors. The error will not occur until runtime.
C: The effects of the trigger body and triggering statement are rolled back D A runtime error occurs and both are rolled back
E A runtime error occurs and both are rolled back



Leave a Reply 0

Your email address will not be published. Required fields are marked *