HOWTO: Determine Size of a Table in SQL Server

To determine the size of a table inside SQL Server you can use the following SQL statement:

EXEC sp_spaceused '<tablename>'

If you want to do this for all tables simply use the undocumented procedure sp_MSforeachtable:

EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"

Kick It auf

Leave a Reply

Your email address will not be published.