Question: 7 - Suppose you have a database schema below. Orders ( orderld , totalSales ) Order _ items ( orderltemld , orderld, itemPrice ) Write
Suppose you have a database schema below.
Orders orderld totalSales
Orderitems orderltemld orderld, itemPrice
Write a MySQL trigger to automatically update the totalSales column in the Orders table whenever a new row is inserted into the Orderitems table. The Orderitems table contains the orderld foreign key referencing Orders table and itemPrice columns. pts
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
