title: Get column information for a User-Defined Table Type
body: <p>How can I get back the column information for a User-Defined Table Type?</p>
  
  <pre><code>EXEC sp_columns TABLENAME
  </code></pre>
  
  <p>gets me back all the column information for a table.</p>
  
  <p>I want to do the same thing for a User-Defined Table Type called SearchList and roughly the same column information back.</p>
  
  <p>I want to get this so I can code generate the Data Tables that I need in c#.</p>
  
  <p>UPDATE TO SHOW WHAT I USED</p>
  
  <pre><code>select c.name as COLUMN_NAME, t.name as [TYPE_NAME], c.precision as [PRECISION], c.is_nullable as [NULLABLE], c.system_type_id, c.precision as [LENGTH]
  from sys.columns c, sys.types t
  where c.object_id = (select type_table_object_id from sys.table_types where name = 'SearchList')
  and t.user_type_id = c.user_type_id
  order by c.column_id
  </code></pre>