sql统计表总数以及表中字段总数

sql统计表总数:select count() from sysobjects where type=‘U’sql统计表总数以及表中字段总数
统计字段总数:select count(
) from syscolumns where id = object_id(‘表名’)
sql统计表总数以及表中字段总数