Created
November 18, 2014 18:39
-
-
Save jsauve/ef2a2aab137f7e8f33ad to your computer and use it in GitHub Desktop.
drop sproc only if exists
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
-- 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