Developing Microsoft SQL Server Databases — Question 1

You have a table named Table1 that stores customer data.
Each customer has a credit limit that can only be discovered by querying multiple tables.
You need to ensure that the value of the credit limit is returned by executing a query on Table1.
What should you create?

Answer options

Correct answer: C

Explanation

The correct answer is C because a calculated column that uses a table-valued function can directly pull in data from multiple tables, allowing the credit limit to be returned as part of Table1's query results. The other options are incorrect as triggers are not used for this purpose, and a scalar function would only return a single value rather than the necessary multiple values from different tables.