Back to all posts

Find column in the whole database in sql server

To find a specific column in the whole database in SQL Server, you can query the information schema views. Here's a query you can use: SELECT table_name, c…

To find a specific column in the whole database in SQL Server, you can query the information schema views. Here's a query you can use:

SQL
SELECT table_name, column_name,*
FROM information_schema.columns
WHERE column_name LIKE '%Col name%' 
AND TABLE_CATALOG = 'DatabaseName'

Keep building your data skillset

Explore more SQL, Python, analytics, and engineering tutorials.