SQL

统计DB中每张表的数据行数:

SELECT   a.name, b.rows
  FROM      sysobjects AS a INNER JOIN
                sysindexes AS b ON a.id = b.id
 WHERE   (a.type = ‘u’) AND (b.indid IN (0, 1))
  ORDER BY b.rows DESC

Leave a Reply

Your email address will not be published. Required fields are marked *