Monday 26 November 2012

Delete a temp table in sql server if it already exists

 
IF OBJECT_ID('tempdb..##tmp') IS NOT NULL 
begin
DROP TABLE ##tmp
end
CREATE TABLE ##tmp  
( TableName varchar(255),DifferenceInCounts int ) 

No comments:

Post a Comment