select
a.name
,count(0) 字段总数
from
sys.objects a
inner join sys.all_columns b on a.object_id=b.object_id
where
a.type='U' and a.name='表名'
group by
a.name
select
a.name
,count(0) 字段总数
from
sys.objects a
inner join sys.all_columns b on a.object_id=b.object_id
where
a.type='U' and a.name='表名'
group by
a.name