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 a.name,b.rows DESC;
显示条数和占用大小
SELECT OBJECT_NAME(id) 数据表, RTRIM(8 * dpages) + 'KB' 占用空间大小, rows 数据总条数 FROM sysindexes WHERE indid = 1 ORDER BY rows DESC , 数据表 , reserved DESC;