What should you do to make sure that the computed columns that use the result from this function can be indexed?

A common language runtime (CLR) user-defined scalar function will be contained in the database. An integer value will be returned by the function. What should you do to make sure that the computed columns that use the result from this function can be indexed?

A common language runtime (CLR) user-defined scalar function will be contained in the database. An integer value will be returned by the function. What should you do to make sure that the computed columns that use the result from this function can be indexed?

A.
You should make sure that the logic of the function returns a different value for the same input values and the same database state. Make sure that you have set the IsDeterministic property to True.

B.
You should make sure that the logic of the function returns the same value for the same input values and the same database state. Make sure that you have set the IsDeterministic property to True.

C.
You should make sure that a different value is returned by the logic of the function for the same input values and the same database state. Make sure that you have set the IsDeterministic property to False.

D.
You should make sure that the same value is returned by the logic of the function returns for the same input values and the same database state. Make sure that you have set the IsDeterministic property to False.

Explanation:
Any computed column that contains a common language runtime (CLR) expression must be deterministic and marked PERSISTED before the column can be indexed. Expressions are deterministic if they always return the same result for a specified set of inputs.



Leave a Reply 0

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