Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

image text in transcribed

Orders Table

image text in transcribed

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

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

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions

Question

We are doing better in both overall sales and in profits.

Answered: 1 week ago