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
Updated on Sep 2020
You can use CREATE OR ALTER statement (was added in SQL Server 2016 SP1):
The
CREATE OR ALTERstatement acts like a normalCREATEstatement by creating the database object if the database object does not exist and works like a normalALTERstatement if the database object already exists.