select b.name as tablename , --表名
a.rowcnt as datacount, --条数
rtrim(8*a.dpages) as size --占用空间单位KB
from sysindexes a ,
sysobjects b
where a.id = b.id
and a.indid < 2
and objectproperty(b.id, 'IsMSShipped') = 0
order by b.name
转载于:https://www.cnblogs.com/ainidewen/p/4271950.html