How to drop a table if it exists?
Is it correct to do the following? No. That will drop the table only if it contains any rows (and will raise an error if the table does not exist). Instead, for a permanent table you can use Or, for a temporary table you can use SQL Server 2016+ has a better way, using DROP TABLE IF … Read more