Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a trigger for the Order table (Table 1) below in which whenever a new order is entered, before inserting this data into the database,
Create a trigger for the Order table (Table 1) below in which whenever a new order is entered, before inserting this data into the database, trigger will compute Total and Sales_Commision and insert it with the entered values as shown in Table 1.
Create a trigger for the Order table (Table 1) below in which whenever a new order is entered, before inserting this data into the database, trigger will compute Total and Sales_Commision and insert it with the entered values as shown in Table 1.
[Write SQL trigger to carry out the following actions:]
b. Create a trigger for the Order table (Table 1) below in which whenever a new order is entered, before inserting this data into the database, trigger will compute Total and Sales Commision and insert it with the entered values as shown in Table 1. The following is the SQL syntax for insert and select function of Order table. mysql > insert into Order values (A001, 300, 200, 550, 0, 0); Query OK, 1 row affected (0.05 sec) mysql> select * from Order; OrderID A001 Product1 300 Product2 Product3 Total 200 550 1050 Table 1: Order Table Sales Commission 210 * Sales_Commission is 20% of the Total valueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started