Microsoft
70-457 · Question #48
70-457 Question #48: Real Exam Question with Answer & Explanation
The correct answer is C. IF (XACT_STATE ( ) ) = 1. See the full explanation below for the reasoning.
Question
You use Microsoft SQL Server 2012 to create a stored procedure as shown in the following code segment. (Line numbers are included for reference only.) The procedure can be called within other transactions. You need to ensure that when the DELETE statement from the HumanResourcesJobCandidate table succeeds, the modification is retained even if the insert into the Audit.Log table fails. Which code segment should you add to line 14?
Exhibit
Options
- AIF @@TRANCOUNT = 0
- BIF (XACT_STATE ( ) ) = 0
- CIF (XACT_STATE ( ) ) = 1
- DIF @@TRANCOUNT = l
Community Discussion
No community discussion yet for this question.
