. Consider the following relational schema: Employee (EmpNo, EmpName, Salary, EmpPhone, EmpCommRate, ManagerId*) Order (OrdNo, OrdDate, OrdName, EmpNo*) OrdLine (OrdNo*, ProNo*, Quantity) Product (ProNo, ProName, ProPrice, ProQuantityOn Hand) Create a trigger to propagate updates to the Product table after an operation of quantity update on the OrdLine table. You have to create a trigger on OrdLine table For Update Event. The trigger will perform following function: For quantity updates on OrdLine Table, the trigger should decrease the Product quantity on hand in Product table by the difference between the new order quantity minus the old order quantity. [ ProQuantityOn Hand = New Order Quantity – Old Order Quantity ]
1. Consider the following relational schema: Employee (EmpNo, EmpName, Salary, EmpPhone, EmpCommRate, ManagerId*) Order (OrdNo, OrdDate, OrdName, EmpNo*) OrdLine (OrdNo*, ProNo*, Quantity) Product (ProNo, ProName, ProPrice, ProQuantityOn Hand) Create a trigger to propagate updates to the Product table after an operation of quantity update on the OrdLine table. You have to create a trigger on OrdLine table For Update Event. The trigger will perform following function: For quantity updates on OrdLine Table, the trigger should decrease the Product quantity on hand in Product table by the difference between the new order quantity minus the old order quantity. [ ProQuantityOn Hand = New Order Quantity – Old Order Quantity ]
Step by step
Solved in 2 steps