-- 查看系统所有表占用的空间情况
create table tmpspace
(Fname varchar(50),
Frows int,
Freserved varchar(50),
Fdata
varchar(50),
Findex_size varchar(50),
Funused
varchar(50));

insert into tmpspace
(Fname,Frows,Freserved, Fdata,Findex_size,Funused)
exec sp_msforeachTable
@Command1="sp_spaceused '?'"

select * from tmpspace where Fname like
'TMP%' order by Fdata desc


drop table tmpspace

posted on 2019-01-23 20:41  RogerLu  阅读(399)  评论(0编辑  收藏  举报