IF object_id('tempdb..#MyTempTable') IS NOT NULL BEGIN DROP TABLE #MyTempTable PRINT 'Table dropped' END CREATE TABLE #MyTempTable ( ID int IDENTITY(1,1), SomeValue varchar(100) ) GO
Checking for the existence of a temporary table
- Leave a comment
IF object_id('tempdb..#MyTempTable') IS NOT NULL BEGIN DROP TABLE #MyTempTable PRINT 'Table dropped' END CREATE TABLE #MyTempTable ( ID int IDENTITY(1,1), SomeValue varchar(100) ) GO
The World as I see it
Making The Complex Simple
Random thoughts on software construction, design patterns and optimization.
A tragic's view from the cricket hinterlands