Skip to content

Instantly share code, notes, and snippets.

@jsauve
Created November 18, 2014 18:39
Show Gist options
  • Save jsauve/ef2a2aab137f7e8f33ad to your computer and use it in GitHub Desktop.
Save jsauve/ef2a2aab137f7e8f33ad to your computer and use it in GitHub Desktop.
drop sproc only if exists
-- USE THIS?
IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[mySproc]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
DROP PROCEDURE dbo.mySproc;
END;
GO
-- OR JUST THIS?
DROP PROCEDURE dbo.mySproc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment