SQL Server Drop Temporary Table Syntax Enhancement in SQL Server 2016

Tags: SQL Server, 2016, drop, temp, temporary, table

SQL Server 2016 and onwards:

DROP TABLE IF EXISTS #MyTable

Prior to SQL Server 2016:

IF OBJECT_ID('tempdb.dbo.#MyTable', 'U') IS NOT NULL DROP TABLE #MyTable; 

No Comments

You must log on to comment.