title: Where do I find Sql Server metadata for column datatypes?
body: <p>I know that I can get access to column properties via:</p>
  
  <pre><code>select * 
  from sysobjects
  </code></pre>
  
  <p>What I can't find however is information about where to get the type and type length for a column, ie: in </p>
  
  <pre><code>FOO VARCHAR(80)
  </code></pre>
  
  <p>Where do I look to find the "VARCHAR(80)" part of the type declaration in the metadata tables?  </p>
  
  <p>I tried looking at the systypes table, but its values for xtype do not match up to the values of xtype in the sysobjects table.  </p>
  
  <p>*I do not have access to the original SQL used to build these tables nor do I have any admin rights.  </p>
  
  <p>If you're familiar with DB2 I'm looking for the equivalent to </p>
  
  <pre><code>select name,
         coltype,
         length,
    from sysibm.syscolumns
  where tbname = 'FOO'
  </code></pre>