Need to create a trigger on the EMP table that monitors every row that is changed and place this info into the AUDIT_TABLE What type of Trigger to be used ?

  1. FOR EACH ROW trigger on the EMP table

  2. Statement-level Trigger on the EMP table

  3. FOR EACH ROW trigger on the AUDIT_TABLE table

  4. Statement-level Trigger on the AUDIT_TABLE


Correct Option: A

AI Explanation

To answer this question, you need to understand the different types of triggers in SQL.

Option A) FOR EACH ROW trigger on the EMP table - This option is correct because it specifies a trigger that is fired for each row that is changed in the EMP table. In this case, the trigger will be used to monitor every row that is changed in the EMP table and place the information into the AUDIT_TABLE.

Option B) Statement-level Trigger on the EMP table - This option is incorrect because a statement-level trigger is fired only once for each SQL statement, regardless of the number of rows affected. It would not be suitable for monitoring every row that is changed in the EMP table.

Option C) FOR EACH ROW trigger on the AUDIT_TABLE table - This option is incorrect because it specifies a trigger on the AUDIT_TABLE table, not the EMP table. The requirement is to create a trigger on the EMP table.

Option D) Statement-level Trigger on the AUDIT_TABLE - This option is incorrect because it specifies a statement-level trigger on the AUDIT_TABLE, which would not be suitable for monitoring every row that is changed in the EMP table.

The correct answer is A) FOR EACH ROW trigger on the EMP table. This option is correct because it specifies a trigger that is fired for each row that is changed in the EMP table, which is what is required in this case.

Find more quizzes: