title: how to find out the column dependencies of a table
body: <p>I have written a query to find out column names of tables in the database.</p>
  
  <pre><code>SELECT 
    t.NAME AS TABLEName,
    SCHEMA_NAME(schema_id) + '.' + c.name AS ColumnName
  FROM 
    sys.tables t
    INNER JOIN sys.columns c 
      ON c.object_id = t.object_id
  WHERE OBJECT_NAME(c.object_id) LIKE '%Message%'
  ORDER BY t.NAME
  </code></pre>
  
  <p>So far I've got the expected result, but whatever column I am looking I want to find out the dependency of column related tables. By executing the above query I am getting table names and column names. </p>
  
  <p>How can I get the column related dependent tables?</p>