Question: Write a script that creates and calls a stored function named discount _ price that calculates the discount price of an item in the Order
Write a script that creates and calls a stored function named discountprice that calculates the discount price of an item in the OrderItems table discount amount subtracted from item price To do that, this function should accept one parameter for the item ID and it should return the value of the discount price for that item. Execute the query and take a screenshot of the query and the results.
Write a script that creates and calls a stored function named itemtotal that calculates the total amount of an item in the OrderItems table discount price multiplied by quantity To do that, this function should accept one parameter for the item ID it should use the discountprice function that you created in exercise and it should return the value of the total for that item. Execute the query and take a screenshot of the query and the results.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
