Find how much diskspace a SQL table uses?

Solution 1:

In SQL Server Management Studio, right click on the Database and choose Reports|"Disk Usage By Tables".

Also, I don't know what version of SQL Server it was introduced in, but there is a sproc sp_spaceused that you can pass an object; For example:

sp_spaceused 'MyTable'

Solution 2:

For a table you can use sp_spaceused to determine the size of the table. However, any schema with variable length columns such as varchar/varbinary types will not have a fixed row size. Given that this describes most if not all real databases, you are really only going to be interested in an average row size which can be trivially calculated by dividing the size by the row count.