In SQL Server, if you try to drop an object that doesn’t exist, you’ll get an error. If you don’t want to get an error, you’ll need to add some extra code to check for the existence of the object.
Prior to SQL Server 2016, you needed to add an IF
statement that queried the relevant system objects to find out whether or not the object existed.
From SQL Server 2016, you can now use a new, cleaner method to check if an object exists. We’ll call it DROP IF EXISTS
(otherwise known as “DIE”).