SELECT a.name, b.rows
,LTRIM (STR (b.used * 8/(case when b.used<1000 then 1 else 1024 end) , 15, 0)
+ (case when b.used<1000 then ' KB' else ' MB' end)) as [使用空间]
,LTRIM (STR (b.reserved * 8/(case when b.reserved<1000 then 1 else 1024 end), 15, 0)
+ (case when b.reserved<1000 then ' KB' else ' MB' end)) as [分配空间]
FROM sysobjects AS a
INNER JOIN sysindexes AS b ON a.id = b.id
WHERE (a.type = 'u') AND (b.indid IN (0, 1))
ORDER BY b.rows DESC

 

相关文章:

  • 2021-07-12
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
猜你喜欢
  • 2021-09-23
  • 2021-05-30
  • 2021-08-21
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-07-14
相关资源
相似解决方案