Saturday, 9 December 2006

TSQL : Checking for object existance...


IF EXISTS(SELECT Name FROM SysObjects WHERE Name='TEMP_MATCH_USERS' AND xType='U')
BEGIN
 PRINT 'Dropping table dbo.TEMP_MATCH_USERS...'
 DROP TABLE [dbo].[TEMP_MATCH_USERS]
END
GO

No comments: