宇筱博客

  • 解决办法
  • 学无止境
  • 记录时光
  • 百宝箱
宇筱博客
点滴记忆,汇聚成海。
  1. 首页
  2. 解决办法
  3. 正文

SQL Server查看表空间占用情况

2019年1月1日 638点热度 0人点赞 0条评论

create table tablesize (name varchar(50),rows int,reserved varchar(50),data varchar(50),index_size varchar(50),unused varchar(50))

insert into tablesize (name,rows,reserved,data,index_size,unused) exec sp_msforeachTable @Command1="sp_spaceused '?'"

update tablesize set data=replace(data,'KB','')

select *,convert(int,data) as a from tablesize order by A desc

drop table tablesize

原文链接:https://www.cnblogs.com/GarfieldTom/archive/2012/01/13/2322070.html

标签: 暂无
最后更新:2019年1月1日

小渔民

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2025 宇筱博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备15017825号-2