select a.name as 表名, max(b.rows) as 记录条数 from sysobjects a ,sysindexes b
where a.id=b.id and a.xtype='u'
group by a.name
order by max(b.rows) desc
sqlserver查询表数量和表记录条数
于 2024-04-11 15:09:55 首次发布
select a.name as 表名, max(b.rows) as 记录条数 from sysobjects a ,sysindexes b
where a.id=b.id and a.xtype='u'
group by a.name
order by max(b.rows) desc