Search a column name across all databases
I have this query that finds all tables and views that matches my column name of a certain database. I am using SQL SERVER 2008 SELECT table_name FROM information_schema.columns WHERE column_name = 'product_name' I want to extend the capability of my query to search across all databases and even look for Stored procedures whose having my searched column name. This script will search your column in all tables across all databases. Create table #yourcolumndetails(DBaseName varchar(100), TableSchema varchar(50), TableName varchar(100),ColumnName varchar(100), DataType varchar(100), CharMaxLength