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?
A.
IF @@TRANCOUNT = 0
B.
IF (XACT_STATE ( ) ) = 0
C.
IF (XACT_STATE ( ) ) = 1
D.
IF @@TRANCOUNT = l
Explanation:
http://msdn.microsoft.com/en-us/library/ms189797.aspx Reference: http://msdn.microsoft.com/en-us/library/ms187967.aspx