Skip to content

Commit 552db1a

Browse files
committed
Updated to be better in presenting the results (mask)
1 parent 034bec4 commit 552db1a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
select
22
t.name [Table],
3-
max (p.rows) [Rows],
4-
round (sum (8 * a.data_pages)/1024.0,2) [Data (MB)],
5-
sum (8 * a.used_pages)/1024.0 [Used (MB)],
6-
sum (8 * a.total_pages)/1024.0 [Total (MB)]
3+
MAX(FORMAT(p.rows, '#,###')) AS [Rows],
4+
FORMAT(SUM(round(8 * a.data_pages/1024.0,2)),'#,###') [Data (MB)],
5+
FORMAT(SUM(round(8 * a.used_pages/1024.0,2)),'#,###') [Used (MB)],
6+
FORMAT(SUM(round(8 * a.total_pages/1024.0,2)),'#,###') [Total (MB)]
77
from
88
sys.tables t
99
inner join sys.partitions p
1010
on t.object_id = p.object_id
1111
inner join sys.allocation_units a on p.partition_id = a.container_id
1212
group by t.name
13-
order by 1
13+
order by
14+
CAST(FORMAT(SUM(round(8 * a.total_pages/1024.0,2)),'####') AS INT)
15+
DESC

0 commit comments

Comments
 (0)