USE [collateral] GO if exists(select * from sys.objects where Name = 'sproc_name' and type = 'P') drop procedure sproc_name GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE sproc_name @intParam int AS BEGIN SET NOCOUNT ON; begin transaction [txn] begin try -- sproc sql here commit transaction [txn] end try begin catch rollback transaction [txn] end catch END GO
Friday, October 24, 2014
SQL Server - Stored Proc Skeleton
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
comment: