Simple stored procedure syntax using try catch block and transaction.
create Procedure sp_name
As
Begin
BEGIN TRY
BEGIN TRAN
--sql query here
Commit
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION;
END CATCH
End
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.