title: Find dependencies for particular column across multiple databases
body: <p>I'm looking to find references to a particular column throughout all of my databases. the script below checks to see if the column exists in other tables across databases but I want to go further to check to see where it is used in the queries that input into the tables/views</p>
  
  <pre><code>Create table #yourcolumndetails(DBaseName varchar(100), TableSchema varchar(50), TableName varchar(100),ColumnName varchar(100), DataType varchar(100), CharMaxLength varchar(100))
  
  
  
  EXEC sp_MSForEachDB @command1='USE [?];
      INSERT INTO #yourcolumndetails SELECT
      Table_Catalog
      ,Table_Schema
      ,Table_Name
      ,Column_Name
      ,Data_Type
      ,Character_Maximum_Length
      FROM INFORMATION_SCHEMA.COLUMNS
      WHERE COLUMN_NAME like ''%oracle_vendor_site_id%'''
  
  select * from #yourcolumndetails
  Drop table #yourcolumndetails 
  </code></pre>