February 20, 2003 at 5:50 pm
Hi everyone, is there a way to find out the size of each table in my database?
February 20, 2003 at 6:04 pm
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.
February 20, 2003 at 6:14 pm
I want the size of the table. Thanks.
February 21, 2003 at 8:33 am
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