- IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'TableName')
- BEGIN
- PRINT 'Table Exists'
- END
- Else
- Begin
- PRINT 'Table Not Exists'
- End
In this query we check if table is exists in database or not.
In this query we check if table is exists in database or not.