title: Find all tables containing a set of columns
body: <p>I need help with a query <em>that finds <strong>all tables</strong> containing <strong>a set of columns</em></strong> (not one column).</p>
  
  <p>I'm thinking about building a stored procedure or something that can take a comma separated list of columns and then return the table names.
  Preferably it should also work with temporary tables.</p>
  
  <p>I'm not asking you guys to write the SP for me, just give me a hint on what do to to find tables contain a list of columns instead of one column.</p>
  
  <p>Something like </p>
  
  <pre><code>EXEC GetAllTablesContainingColumns 'ColA, ColB, ColC' 
  </code></pre>
  
  <p>I've thought about modifying the following </p>
  
  <pre><code>SELECT c.SCHEMA_NAME, c.TABLE_NAME
  FROM INFORMATION_SCHEMA.COLUMNS c
  WHERE c.COLUMN_NAME = @columnname
  </code></pre>
  
  <p>but don't really know how to include multiple values without ending up with</p>
  
  <pre><code>SELECT c.SCHEMA_NAME, c.TABLE_NAME
      FROM INFORMATION_SCHEMA.COLUMNS c
      WHERE c.COLUMN_NAME = @columnname1
        AND c.COLUMN_NAME = @columnname2
        AND c.COLUMN_NAME = @columnname3
        AND c.COLUMN_NAME = @columnname4
        ...
  </code></pre>