SELECT 表名 = case when a.colorder = 1 then d.name
else '' end,
表说明 = case when a.colorder = 1 then isnull(f.value, '')
else '' end
else '' end,
表说明 = case when a.colorder = 1 then isnull(f.value, '')
else '' end
FROM syscolumns a
inner join sysobjects d
on a.id = d.id
and d.xtype = 'U'
and d.name <> 'sys.extended_properties'
left join sys.extended_properties f
on a.id = f.major_id
and f.minor_id = 0
Where (case when a.colorder = 1 then d.name else '' end) <>''
inner join sysobjects d
on a.id = d.id
and d.xtype = 'U'
and d.name <> 'sys.extended_properties'
left join sys.extended_properties f
on a.id = f.major_id
and f.minor_id = 0
Where (case when a.colorder = 1 then d.name else '' end) <>''