Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

LO4 Identify a system for controlling absenteeism.

Answered: 1 week ago