SqlServer查看所有表数据条数

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

  

posted @ 2022-12-02 17:51  极客船长  阅读(1214)  评论(0编辑  收藏  举报