SELECT name,type_name(xtype) AS type,length,(type_name(xtype)+'('+CONVERT(varchar,length)+')') as t FROM syscolumns WHERE (id = OBJECT_ID('表名或者视图名'))