Question: Oracle PL/SQL : The following table was created: CREATE TABLE audit_table (action VARCHAR2(50), user_name VARCHAR2(30) DEFAULT USER, last_change_date TIMESTAMP DEFAULT SYSTIMESTAMP); A statement-level trigger was
Oracle PL/SQL: The following table was created:
CREATE TABLE audit_table
(action VARCHAR2(50),
user_name VARCHAR2(30) DEFAULT USER,
last_change_date TIMESTAMP DEFAULT SYSTIMESTAMP);
A statement-level trigger was then created that inserted a row into the AUDIT_TABLE immediately after one or more rows have been added to the EMPLOYEES table. The AUDIT_TABLE row contains the value 'Inserting' in the action column, whereas the other two columns contain their default values. The trigger has been tested via inserting a row into EMPLOYEES, and AUDIT_TABLE has been queried to see that it contains a row.
Q: Make sure the trigger does not fire with a DELETE by deleting the employee record previously entered. Then recheck the AUDIT_TABLE to make sure that there is not another new row.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
