Monday, June 14, 2010

Check if table exists in SQL server database

Check if table exists or not in database in SQL server.

IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 'TBL_Name')

BEGIN

PRINT 'Found'

END

No comments:

Post a Comment