To check if a table exists in MSSQL you can use one of these two snippets.
Sample MSSQL using INFORMATION_SCHEMA
IF (EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tablename' AND TABLE_SCHEMA = 'dbo' )) BEGIN -- do something END
Sample MSSQL using OBJECT_ID
IF OBJECT_ID('tablename') is not null BEGIN -- do something END
RT @CodeSnippetsNET: How to check if a table exists in MSSQL http://t.co/qwvI2L70O2 #mssql #sql #csharp #vb