1IF (EXISTS (SELECT *
2 FROM INFORMATION_SCHEMA.TABLES
3 WHERE TABLE_SCHEMA = 'TheSchema'
4 AND TABLE_NAME = 'TheTable'))
5BEGIN
6 --Do Stuff
7END
1IF EXISTS
2 (SELECT object_id FROM sys.tables
3 WHERE name = 'Artists'
4 AND SCHEMA_NAME(schema_id) = 'dbo')
5 PRINT 'The table exists'
6ELSE
7 PRINT 'The table does not exist';
8