I want to check if a list of stored procedures exist. I want this all to be done in 1 script, one by one. So far I have this format:
USE [myDatabase]
GO
IF NO
Just in case if you are using SQL server 2016, then there is a shorter version to check if the proc exist and then drop and recreate it
USE [DATABASENAME]
GO
DROP PROCEDURE IF EXISTS
GO
CREATE PROCEDURE
AS
-- your script here
END
GO
GRANT EXECUTE ON TO
Source : https://blogs.msdn.microsoft.com/sqlserverstorageengine/2015/11/03/drop-if-exists-new-thing-in-sql-server-2016/