Developing Microsoft SQL Server Databases — Question 25

You need to modify usp_GetOrdersAndItems to ensure that an order is NOT retrieved by usp_GetOrdersAndItems while the order is being updated.
What should you add to usp_getOrdersAndItems?

Answer options

Correct answer: A

Explanation

The correct answer is A because setting the transaction isolation level to SERIALIZABLE ensures that no other transactions can access the order while it is being updated, thus preventing any retrieval during that time. The other options do not provide the same level of locking or isolation required to achieve this effect.