CREATE OR REPLACE TRIGGER update_emp AFTER UPDATE ON EMP BEGIN INSERT INTO AUDIT_TABLE values(user ,sysdate ); END ; you issue an update command in the EMP tables that result in a update of 10 rows. How many rows are inserted into the AUDIT_TABLE ?

  1. 1

  2. 10

  3. none

  4. Value equal to number of rows in EMP table


Correct Option: A

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) 1 - This option is correct because the trigger update_emp is fired after an update is performed on the EMP table. The trigger inserts a single row into the AUDIT_TABLE with the value of the user and the current date and time. Since the trigger is fired only once, regardless of the number of rows updated, only one row will be inserted into the AUDIT_TABLE.

Option B) 10 - This option is incorrect because the trigger only inserts one row into the AUDIT_TABLE, regardless of the number of rows updated in the EMP table.

Option C) none - This option is incorrect because the trigger does insert a row into the AUDIT_TABLE after the update on the EMP table.

Option D) Value equal to the number of rows in the EMP table - This option is incorrect because the trigger only inserts one row into the AUDIT_TABLE, regardless of the number of rows in the EMP table.

The correct answer is A) 1. This option is correct because the trigger update_emp inserts a single row into the AUDIT_TABLE regardless of the number of rows updated in the EMP table.

Find more quizzes: