Saturday, February 28, 2015

Raiserror behavior in TRY-CATCH block

Hi Erland,


Indeed, the ; should be also written. Therfore I have added the ; in the code.


Please see the revised code:



BEGIN TRY
BEGIN TRAN
SELECT 1/0; --EXAMPLE
COMMIT TRAN;
END TRY
BEGIN CATCH
ROLLBACK TRAN;
THROW
END CATCH;

Regards,


Reshma




Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered


No comments:

Post a Comment