


TABLE_CATALOG – AKA Table qualifier is where the targeted database should be specified under single quotation marks.WHERE TABLE_CATALOG = 'AdventureWorks2014' AND COLUMN_NAME LIKE '%address%' Ĭolumn names are variables that need to be specified to meet the search criteria: The query below finds partial matches because it has Like and % wildcard characters in the Where clause: The AdventureWorks2014 sample database is used throughout all examples. Let’s launch SQL Server Management Studio and see what scripts can be used for searching databases and finding a specific column name.

There are many solutions on the internet for this and most of the suggestions are different scripts joining sys.table with sys.columns that require the user to change the parts here and there to meet requirements. The challenge could be as simple as that there’s a need to search for column names in SQL Server to find duplicate names or even to search if a column exists, especially on large databases with thousands of tables.
#APEX SQL HTMP COLUMN SOFTWARE#
Furthermore, the third-party software solution called ApexSQL Search will be shown that can be used in the same way as any search engine is used on the internet to find results. This schema is held within each database and it contains metadata for all database objects stored in the database. One is the native way by simply querying the system information schema views. This sounds like a simple task on its own and it is, but there are several solutions for this task and the purpose of this write-up is to show the most efficient way of completing it. This article explains the easiest way to search for a column name in SQL Server.
