create table 表空间占用情况(name varchar(255), rows bigint, reserved varchar(20), data varchar(20), index_size varchar(20), unused varchar(20)) exec sp_MSforeachtable 'insert into 表空间占用情况 exec sp_spaceused ''?''' select * from 表空间占用情况 order by rows desc