How to check if a table exists in SQL Server database

0
How to check if a table exists in SQL Server database
Rate this post

There are several methods to check if a table exists in SQL Server database.

Using INFORMATION_SCHEMA.TABLES

Query like below can be used to check if a Table exists in the selected mssql database.

Using OBJECT_ID() function

OBJECT_ID() can be used to confirm existence of a table.

Using sys.Objects or sys.Tables Catalog View

Sys.Objects and sys.Tables catalog views can also be used to check if a table exist or not.

 

You might also like

Leave A Reply

Your email address will not be published.