Question: Complete using SQL and provide the code Offices Table 1. Create a trigger that will allow you to check the value of the country column

Complete using SQL and provide the code

Offices Table

Complete using SQL and provide the code Offices Table 1. Create a

1. Create a trigger that will allow you to check the value of the country column before any insert action to the offices table, so that:

country can only be USA, France, Japan, UK, and Australia

If the value to be inserted to the country column is outside of the listed values, we assign the country column of the record to NULL.

Customers Table

trigger that will allow you to check the value of the country

Orders Table

column before any insert action to the offices table, so that: country

2. Create a procedure and call it CustomerTotal

Making the procedure will allow you to get the total number of orders made by each customer, along with customer's first and last name, and country.

offices 2

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!