Question: Write the code for the following triggers following the style shown in the text. a. When adding a customer, add the customers balance times the
a. When adding a customer, add the customer’s balance times the sales rep’s commission rate to the commission for the corresponding sales rep.
b. When updating a customer, add the difference between the new balance and the old balance multiplied by the sales rep’s commission rate to the commission for the corresponding sales rep.
c. When deleting a customer, subtract the balance multiplied by the sales rep’s commission rate from the commission for the corresponding sales rep.
Step by Step Solution
3.38 Rating (164 Votes )
There are 3 Steps involved in it
a DELIMITER CREATE TRIGGER AddCustomer AFTER INSERT ON C... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
671-CS-DB (977).docx
120 KBs Word File
