Question: Consider the following schema: invoice (i-id, c-id, date, month, year, p-id, quantity, amount) Product(p-id, p-name, price, numbers-available) A) Write a function to get the

Consider the following schema: invoice (i-id, c-id, date, month, year, p-id, quantity, amount) Product(p-id,

Consider the following schema: invoice (i-id, c-id, date, month, year, p-id, quantity, amount) Product(p-id, p-name, price, numbers-available) A) Write a function to get the p-id and quantity of 2 different products and returns the total amount for the invoice B) Write a trigger to print the message "Stock is not available" if ordered quantity for one product is more than available numbers

Step by Step Solution

3.38 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

A Function to Calculate Total Amount for an Invoice You can write a function in SQL to calculate the ... View full answer

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 Programming Questions!