select sys.columns.name as 字段名, sys.types.name as 字段类型, sys.columns.max_length as 长度, sys.columns.is_nullable as 是否可空, (select count(*) from sys.identity_columns where sys.identity_columns.object_id = sys.columns.object_id and sys.columns.column_id = sys.identity_columns.column_id) as 是否自增长 , (select value from sys.extended_properties where sys.extended_properties.major_id = sys.columns.object_id and sys.extended_properties.minor_id = sys.columns.column_id) as 描述 from sys.columns, sys.tables, sys.types where sys.columns.object_id = sys.tables.object_id and sys.columns.system_type_id=sys.types.system_type_id and sys.tables.name=‘TableName‘ order by sys.columns.column_id