一次性查看某数据库的所有表大小:
create table test(
name varchar(50),
rows int,
reserved varchar(20),
data varchar(20),
index_size varchar(20),
unused varchar(20)
)
insert into test
exec sp_MSforeachtable "exec sp_spaceused '?'"
select * from test order by cast(replace(reserved,'KB','') as int) desc
一次性查看某数据库的所有表大小
最新推荐文章于 2024-06-18 12:19:08 发布