题目内容

You are creating a stored procedure that will delete data from the Contact table in a SQL Server 2005 database. The stored procedure includes the following Transact-SQL statement to handle any errors that occur. BEGIN TRY BEGIN TRANSACTION DELETE FROM Person.Contact WHERE ContactID = @ContactID COMMIT TRANSACTION END TRY BEGIN CATCH DECLARE @ErrorMessage nvarchar(2000) DECLARE @ErrorSeverity int DECLARE @ErrorState int SELECT @ErrorMessage = ERROR MESSAGE(),@ErrorSeverity=ERROR SEVERITY(),@ErrorState = ERROR STATE() RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState) END CATCH; You test the stored procedure and discover that it leaves open transactions. You need to modify the stored procedure so that it properly handles the open transactions. What should you do?()

Add a COMMIT TRANSACTION command to the CATCH block.
B. Remove the COMMIT TRANSACTION command from the TRY block.
C. Add a ROLLBACK TRANSACTION command to the CATCH block.
D. Add a ROLLBACK TRANSACTION command to the TRY block.

查看答案
更多问题

设M/M/N系统的利用系数为λ/N,则说法准确的为()

A. λ/N可以小于0
B. λ/N>1,则系统稳定
C. λ/N<1,则系统不稳定
D. λ/N>1,则系统不稳定

企业自行研发的无形资产在研究阶段发生的支出期末应该记入"管理费用"科目中。()

A. 正确
B. 错误

价不稳定既可表现为通货膨胀,也可以表现为通货紧缩。

A. 正确
B. 错误

洗手间的自动灭火装置如被使用过,喷嘴的颜色()。

A. 白变黄
B. 黄变白
C. 黑变白
D. 白变黑

答案查题题库