Question: 1A) Write a trigger that will be fired when updating the salary of employees, the trigger will be able to display the old salary and

1A) Write a trigger that will be fired when updating the salary of employees, the trigger will be able to display the old salary and the new salary of the employees updated and the amount of change in the salary. Hint: use OLD and NEW qualifiers

B)Create Emp_log table using this code:

CREATE TABLE Emp_log ( Emp_id NUMBER, Log_date DATE, New_salary NUMBER, Action VARCHAR2(20));

Then, write a trigger that will be fired after updating the salary of employees and the trigger will insert the information of all employees that have been updated to the Emp_log table. emp_id => represents the id of the employee updated. log_date => sysdate new_salary => the updated salary Action => 'New Salary'

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!