Question: SQL TRIGGER: Add a trigger to your check table (or equivalent) so that whenever a new sale of a menu item occurs (i.e. a new

SQL TRIGGER: Add a trigger to your check table (or equivalent) so that whenever a new sale of a menu item occurs (i.e. a new INSERT to Check Detail), automatically deduct the quantity from the quantity on hand of that item's inventory.

Please show an example of a trigger statement that goes with the question above.

You may use your own tables/values but please explain what the tables mean.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

sql Create CheckDetail table for sales transactions CREATE TABLE CheckDetail SaleID INT PRIMARY KEY ... 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

Students Have Also Explored These Related Databases Questions!