Check for existence before dropping
suggest changeDROP TABLE IF EXISTS MyTable;
DROP TABLE IF EXISTS MyTable;
If Exists(Select * From Information_Schema.Tables
Where Table_Schema = 'dbo'
And Table_Name = 'MyTable')
Drop Table dbo.MyTable
DROP TABLE IF EXISTS MyTable;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents