艺海无涯,学无止境。欢迎一起探讨技术和人生,了解我

SQL查询数据每个表的数据量

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;