Question: Assume the Branch table contains a column called TotalValue that represents the total price for all books at that branch. Following the style shown in

Assume the Branch table contains a column called TotalValue that represents the total price for all books at that branch. Following the style shown in the text, write the code for the following triggers.
a. When inserting a row in the Copy table, add the price to the total value for the appropriate branch.
b. When updating a row in the Copy table, add the difference between the new price and the old price to the total value for the appropriate branch.
c. When deleting a row from the Copy table, subtract the price on the record being deleted from the total value for the appropriate branch.

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a DELIMITER CREATE TRIGGERAddTotalValue AFTER INSERT ... View full answer

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

Document Format (1 attachment)

Word file Icon

671-CS-DB (988).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!