Wednesday, September 29, 2010

drop table if exists sql-server 2008/2005

drop table if exists sql-server 2008/2005
 
In this sample I am dropping a temp table #temp4 :-
 
IF OBJECT_ID('tempdb..#temp4', 'U') IS NOT NULL
DROP TABLE #temp4

No comments: