You need to create a database object that meets the following requirements:
accepts a product identifies as input

calculates the total quantity of a specific product, including quantity on hand and quantity on order

caches and reuses execution plan

returns a value

can be called from within a SELECT statement

can be used in a JOIN clause

What should you create?
Correct Answer: B
Explanation/Reference:
Explanation:
A table-valued user-defined function can also replace stored procedures that return a single result set. The table returned by a user-defined function can be referenced in the FROM clause of a Transact-SQL statement, but stored procedures that return result sets cannot.
References: https://technet.microsoft.com/en-us/library/ms191165(v=sql.105).aspx