Developing SQL Databases — Question 2

Note: this question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in the series. Information and details provided in a question apply only to that question.
You are developing and application to track customer sales.
You need to return the sum of orders that have been finalized, given a specified order identifier. This value will be used in other Transact-SQL statements.
You need to create a database object.
What should you create?

Answer options

Correct answer: F

Explanation

The correct answer is F, as a table-valued function can return a set of rows, which is ideal for summing multiple finalized orders. Other options, such as DML triggers and procedures, do not return values in the same way and are not suitable for this requirement.