Question: using the oracel sql answer this 5-(20%) Create a stored procedure called set_comm which will go through each record in the STAFF table and set


5-(20%) Create a stored procedure called set_comm which will go through each record in the STAFF table and set the COMM columns as follows: - - 20% of the SALARY if JOB = "Mgr" 10% of the SALARY if JOB = "Clerk" 30% of the SALARY if JOB = "Sales" 50% of the SALARY if JOB = "Prez" Use an UPDATE trigger called upd_comm which will record (insert) a record in the STAFFAUDTBL which records what change was made to the COMM of each individual in the STAFF table. You will need to add two columns to the STAFFAUDTBL table. One called OLDCOMM and another called NEWCOMM. When INSERTing a record into this table for Q5 you should fill in the ID, set INCJOB to NULL, place the original commission (COMM) in the OLDCOMM field and new commission (COMM) in the NEWCOMM field. WHAT TO HAND IN: A copy of your stored procedure code and trigger code -and-output of the STAFF table after this stored procedure has been executed - and - a copy of your STAFFAUDTBL after the stored procedure has been executed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
