What should you create?

You have a Microsoft SQL Azure database named DBAzurel. DBAzurel contains a table
named Orders that stores sales data.
Each order has a sales total that can only be discovered by querying multiple tables.
You need to ensure that the value of the sales total is returned by executing a query on Orders.
What should you create?

You have a Microsoft SQL Azure database named DBAzurel. DBAzurel contains a table
named Orders that stores sales data.
Each order has a sales total that can only be discovered by querying multiple tables.
You need to ensure that the value of the sales total is returned by executing a query on Orders.
What should you create?

A.
A calculated column that uses a scalar function

B.
A trigger that uses a table-valued function

C.
A calculated column that uses a table-valued function

D.
A trigger that uses a ranking function

Explanation:

A table-valued parameter is scoped to the stored procedure, function, or dynamic TransactSQL text, exactly like other parameters. Similarly, a variable of table type has scope like any
other local variable that is created by using a DECLARE statement. You can declare tablevalued variables within dynamic Transact-SQL statements and pass these variables as
table-valued parameters to stored procedures and functions.
Table-valued parameters offer more flexibility and in some cases better performance than
temporary tables or other ways to pass a list of parameters.
Incorrect:
Not A: A scalar function would only be able to use other columns from the same table.



Leave a Reply 9

Your email address will not be published. Required fields are marked *


annonymous

annonymous

Duplicated of question 83 and the correct answer is A. A calculated column that uses a scalar function.