mssql 查询全部用户创建表 条数及占用空间大小(KB)
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