Finding current table size

  • Hi everyone, is there a way to find out the size of each table in my database?

  • IF you mean number of records, use

    EXECCUTE sp_spaceused 'table_name'.

    This is the fastest way but not always be exact (it reads the number from sysindexes). Otherwise use

    SELECT COUNT(*) FROM <table_name>.

    This is accurate but may be slow on very large tables.

  • I want the size of the table. Thanks.

  • sp_spaceused 'tablename' will provide the number of rows, disk space reserved, and disk space used by a table in the current database.

    See the BOL for more information on this stored procedure.

    -SQLBill

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply