title: How to select column names from multiple tables in SQL Server 2000-2008 that are in a set of names
body: <p>If I have a set of names like this: </p>
  
  <pre><code>('first', 'fname', 'firstname', 'namef', 'namefirst', 'name')
  </code></pre>
  
  <p>What is the best method in SQL Server 2000 - 2008 to retrieve the distinct table names that contain column names in the above set for a specific database?  </p>
  
  <p>And I wanted to exclude system table and temp tables from the list of tables that are displayed.</p>
  
  <pre><code>SELECT so.name
  FROM   sysobjects so
         INNER JOIN syscolumns sc
              ON  so.id = sc.id
  WHERE  sc.name IN ('first', 'fname', 'firstname', 'namef', 'namefirst', 'name')
  </code></pre>
  
  <p>This is a derivative of this <a href="https://stackoverflow.com/questions/14113487/select-same-column-name-in-microsft-sql-server-from-multiple-tables">question</a> I believe.</p>
  
  <p>Thx</p>