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, 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
A Function to Calculate Total Amount for an Invoice You can write a function in SQL to calculate the ... View full answer
Get step-by-step solutions from verified subject matter experts
