传统方法
select * from (
SELECT
c.name 'ColumnName',
t.Name 'DataType',
c.max_length 'MaxLength',
c.precision ,
c.scale ,
c.is_nullable 'IsNullable',
ISNULL(i.is_primary_key, 0) 'IsPrimaryKey',
c.is_identity IsIdentity
FROM
sys.columns c
INNER JOIN
sys.types t ON c.user_type_id = t.user_type_id
LEFT OUTER JOIN
sys.index_columns ic ON ic.object_id = c.object_id AND ic.column_id = c.column_id
LEFT OUTER JOIN
sys.indexes i ON ic.object_id = i.object_id AND ic.index_id = i.index_id
WHERE
c.object_id = OBJECT_ID('t_one_on_one')
) a
inner join (
select sc.name [Column],
sep.value [Description]
from sys.tables st
inner join sys.columns sc on st.object_id = sc.object_id
left join sys.extended_properties sep on st.object_id = sep.major_id
and sc.column_id = sep.minor_id
and sep.name = 'MS_Description'
where st.name = 't_one_on_one'
) b
on a.ColumnName=b.[Column]
快捷函数
sp_help '表名'
参考
sp_help (Transact-SQL)