Question: SQL Code-In this question you will create a Trigger. The trigger watches any UPDATE on the EMPLO table and record them in the SAL_HIST table.

SQL Code-In this question you will create a Trigger. The trigger watches any UPDATE on the EMPLO table and record them in the SAL_HIST table. View the schema of both tables before you start. (Code for table creation attached)Create a trigger that add a new record in the SAL_ HIST table ONLY WHEN an update is made on the SALARY field of the EMPLOYEES table. Reject any increase more than 75% of the old salary with a proper application error message.Write a SQL statement for Update the SALARY of employee_id 110 to 8900?

CREATE TABLE SAL_HIST (TR_ID NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, EMP_ID NUMBER, OLD_SAL NUMBER, NEW_SAL NUMBER, DATE_CHANGE DATE ); SELECT * FROM SAL_HIST;

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!