May 10, 2006 #1 DougP MIS Joined Dec 13, 1999 Messages 5,985 Location US this is what I have so far I know its in the 'benchmark' database if exists table1 in information_schema.tables drop table table1 DougP, MCP, A+
this is what I have so far I know its in the 'benchmark' database if exists table1 in information_schema.tables drop table table1 DougP, MCP, A+
May 10, 2006 2 #2 DotNetGnat Programmer Joined Mar 10, 2005 Messages 5,548 Location IN Code: if Exists ( SELECT * from mydb.dbo.Sysobjects WHERE xtype='U' and name='table1') begin Drop Table table1 End -DNG Upvote 0 Downvote
Code: if Exists ( SELECT * from mydb.dbo.Sysobjects WHERE xtype='U' and name='table1') begin Drop Table table1 End -DNG
May 10, 2006 Thread starter #3 DougP MIS Joined Dec 13, 1999 Messages 5,985 Location US thank you get a star DougP, MCP, A+ Upvote 0 Downvote
May 10, 2006 #4 DotNetGnat Programmer Joined Mar 10, 2005 Messages 5,548 Location IN thanks for the star...glad to help... -DNG Upvote 0 Downvote
May 11, 2006 #5 TysonLPrice Programmer Joined Jan 8, 2003 Messages 859 Location US Just another way to skin that cat: if object_id('tempdb..#TempTable') is not null drop table #TempTable Upvote 0 Downvote
Just another way to skin that cat: if object_id('tempdb..#TempTable') is not null drop table #TempTable