MS SQL 查看一个数据库中所有表的行数

   1:  SELECT   a.name, b.rows
   2:  FROM      sysobjects AS a INNER JOIN
   3:                  sysindexes AS b ON a.id = b.id
   4:  WHERE   (a.type = 'u') AND (b.indid IN (0, 1))
   5:  ORDER BY b.rows DESC

 

image

posted @ 2012-09-29 09:49  sun8134  阅读(993)  评论(1编辑  收藏  举报
分享按钮