Josh Harp
  • Posts: 12
  • Joined: 10/2/2017
I use this auto replace typing "cora" when creating a new stored procedure so that it creates the procedure if it doesn't exist and alters it if it does.


IF OBJECT_ID('<object name, sysname, dbo. >') IS NULL -- Check if SP Exists
 EXEC('CREATE PROCEDURE <object name, sysname, dbo. > AS SET NOCOUNT ON;')
GO

ALTER PROCEDURE <object name, sysname, dbo. > -- Alter the SP Always 
--PARAMETERS HERE
AS 
BEGIN
SET NOCOUNT ON


END

GO
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.