Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer all the questions urgently! Part 1 : Consider the SaleCo Database ERD: Create a stored procedure that takes a date as input and

Please answer all the questions urgently! Part 1: Consider the SaleCo Database ERD:
Create a stored procedure that takes a date as input and displays the number of invoices
issued after that date.
Write a stored function that returns the number of customers in a given area code.
Create a trigger that checks whether a new invoice line could be inserted for a product.
The trigger should read the quantity on hand of the product appearing in the new invoice
line and deduct from it the quantity ordered in the new invoice line and compare the result
to the product's minimum quantity on hand. The trigger should raise an error if the result
is less than the minimum quantity on hand. Use RAISE EXCEPTION.
Create a trigger to update the customer balance (CUS_Balance) in the customer table
after inserting any new Line row (selling a product with line units and line price).
image text in transcribed

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

What is tax allocated to operations?

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago