Question: DONE MYSQL & C# CONSOLE This lab covers user defined functions. For statement syntax, use Google to find examples. If asked for a SQL statement

DONE MYSQL & C# CONSOLE

This lab covers user defined functions.

For statement syntax, use Google to find examples. If asked for a SQL statement write the SQL to perform the requested task, do not use the GUI.

1. Create a function that accepts an item Id as input and returns the retail price of that item. Name the function itemPrice

Paste the create function SQL below.

2. Create a function that accepts an order Id as input and returns the total price of all items on that order multiplied by the quantity ordered.

Hint to return the total price for an order you need to select sum(itemPrice * quantity) from the appropriate tables for a single order.

Paste the create function SQL below.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!