Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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