Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
SELECT 表名,MB_DATA = CASE WHEN isnull(a.data,0) = 0 THEN 0 eLSE rOUND(A.DATA/1024,0) eND, GB_DATA = CASE WHEN isnull(a.data,0) = 0 THEN 0 eLSE rOUND(A.DATA/1024/1024,0) eND FROM (Select 表名,Convert(decimal(18,0),replace(索引占用的磁盘大小,'KB','')) as data From tb_SpaceInfoTable) a ORDER BY A.[data] DESC
SELECT 表名,MB_DATA = CASE WHEN isnull(a.data,0) = 0 THEN 0 eLSE rOUND(A.DATA/1024,0) eND, GB_DATA = CASE WHEN isnull(a.data,0) = 0 THEN 0 eLSE rOUND(A.DATA/1024/1024,0) eND FROM (Select 表名,Convert(decimal(18,0),replace(数据占用的磁盘大小,'KB','')) as data From tb_SpaceInfoTable) a ORDER BY A.[data] DESC