This SQL Server script searches the system object catalog to locate specific tables within a database. By querying the sys.objects system view, the script allows developers and database administrators to quickly verify whether certain tables exist and identify the object type associated with them.
Queries like this are useful during development, debugging, database migrations, and large-scale projects where multiple databases or environments may contain different table structures. Instead of manually browsing database folders in SQL Server Management Studio, this script provides a fast, direct way to confirm the presence of important tables.
The script can easily be expanded to search for additional tables, stored procedures, views, or other SQL Server objects by modifying the names listed in the WHERE IN condition. It is a practical utility query that many developers keep around for everyday database management tasks.
[SQL Server Script]
CFFCS | CarrzSynEdit: | SQL Script
SELECT name, type_desc
FROM sys.objects
WHERE name IN ('TypePropertyTable', 'ArticleTypeTable');