ITPub博客

首页 > 数据库 > SQL Server > SQLSERVER 数据库查看各表的记录数

SQLSERVER 数据库查看各表的记录数

原创 SQL Server 作者:o0yuki0o 时间:2018-01-24 13:57:15 0 删除 编辑

点击(此处)折叠或打开

  1. select a.name as 表名,max(b.rows) as 记录条数 from sysobjects a ,sysindexes b
  2.   where a.id=b.id and a.xtype='u'
  3. group by a.name
  4. order by max(b.rows) desc

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16131092/viewspace-2150489/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-02-26

  • 博文量
    90
  • 访问量
    75892