MSSQL 统计整个数据库所有表数据记录数

 

   SELECT b.name AS tablename, a.rowcnt AS datacount FROM sysindexes a, sysobjects b     

WHERE a.id = b.id AND a.indid < 2 AND   objectproperty(b.id, 'IsMSShipped') = 0 ORDER BY datacount DESC

 

posted @ 2019-11-16 11:12  尼哈  阅读(627)  评论(0编辑  收藏  举报