Microsoft
70-457 · Question #48
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…
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
How the community answered
(46 responses)- A4% (2)
- B9% (4)
- C85% (39)
- D2% (1)
Community Discussion
No community discussion yet for this question.
