答案 0 :(得分:4)
它可以解决一些含糊不清的问题
比较
BEGIN TRAN THROW --Starts a transaction named "THROW"
BEGIN TRY
SELECT 1 / 0
END TRY
BEGIN CATCH
ROLLBACK TRAN
THROW /*Rolls back the transaction named "THROW"*/
END CATCH
要
BEGIN TRAN THROW --Starts a transaction named "THROW"
BEGIN TRY
SELECT 1 / 0
END TRY
BEGIN CATCH
ROLLBACK TRAN; /*rolls back the tran without caring about the name*/
THROW --rethrows the error
END CATCH