Question: 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:]

Create a trigger for the Order table (Table 1) below in which

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 value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!