Developing Microsoft SQL Server Databases — Question 47
Developers report that usp_UpdateOffice periodically returns error 3960.
You need to prevent the error from occurring. The solution must ensure that the stored procedure return the original values to all of the updated rows.
What should you configure in StoredProcedures.sql?
Answer options
- A. Move the SET statement at line 38 to line 45
- B. Change line 38 to: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
- C. Move the SELECT statement at line 41 to line 50
- D. Change line 38 to: SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
Correct answer: C
Explanation
The correct answer is C because moving the SELECT statement to line 50 ensures that the original values are returned after the updates are made, which helps avoid the error. Options A, B, and D do not address the need to return the original values effectively and may not resolve the error 3960 as required.