Get Space Used by Table
Date: 01/12/06
(SQL Server) Keywords: no keywords
Get the space consumed by a particular table or group of tables, including their indexes:
select
substring(object_name(o.id),1,40) "Table Name",
(sum(convert(float,used)) * min(d.low) ) / 1024000.0 MBytes
from sysindexes i, master.dbo.spt_values d, sysobjects o
where o.id = i.id
and indid in (0, 1, 255) and d.number = 1 and d.type = 'E'
and object_name(o.id) like ('% %')
group by substring(object_name(o.id),1,40)
order by mbytes desc
compute sum((sum(convert(float,used)) * min(d.low) ) / 1024000.0)
Source: http://community.livejournal.com/sqlserver/39863.html