Created
October 30, 2014 08:12
-
-
Save geoder101/bb694b7a9bfe7692ec6f to your computer and use it in GitHub Desktop.
t-sql transaction commit/rollback template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN TRY | |
BEGIN TRANSACTION | |
-- insert sql here | |
COMMIT | |
END TRY | |
BEGIN CATCH | |
IF @@TRANCOUNT > 0 ROLLBACK | |
END CATCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment