title: How do I get column type from table?
body: <p>I have this code:</p>
  
  <pre><code>select  a.id as tableid,
      a.name as tableName, 
      b.name as columnName,
      b.status as columnStatus,
      b.type as columnType
      from sysobjects a 
      LEFT JOIN syscolumns b
      ON a.id = b.id
      WHERE a.name = 'table_name'
  </code></pre>
  
  <p>Now, the columType shows numbers. I want to get the name of the columnType, which resides in column 'name' in table 'systypes'.  How do I do that? Simple LEFT JOIN will result in duplicate rows.</p>