SQL Drop table if exist

[code language=”sql”]
Select ‘1’ as Col1 into TestTable

Select * from TestTable

IF OBJECT_ID(‘TestTable’, ‘U’) IS NOT NULL
DROP TABLE TestTable;

[/code]

 

 

Leave a Comment