SqlServer统计
SELECT a.name AS [table name] ,
b.rows AS [record count]
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 a.name ,
b.rows DESC