Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Total size of the row in the table

Author  Topic 

Dance Doll
Yak Posting Veteran

54 Posts

Posted - 2007-02-05 : 17:09:29
Hi,all
How can I get the total size of row in the table. I know the maximum size for the row is 8060 bytes. I have 200 columns in a table. How can I get the actual total size of the row?
Thanks!

Kristen
Test

22859 Posts

Posted - 2007-02-05 : 23:41:38
See "Estimating the Size of a Table" in BoL

Kristen
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-02-05 : 23:42:28
P.S. Don't forget the index requirements too:

"Estimating the Size of a Table Without a Clustered Index"
"Estimating the Size of a Table with a Clustered Index"

Kristen
Go to Top of Page

MohammedU
Posting Yak Master

145 Posts

Posted - 2007-02-06 : 02:01:27
SELECT o.name, Sum( C.length ) As rowLength from
sysobjects o
INNER JOIN
sysColumns C
ON o.id = C.id
WHERE (o.xtype = 'u') AND (o.type = 'u') and o.name = <TabName>
Group by o.name
ORDER BY o.name


http://vyaskn.tripod.com/code/sp_show_huge_tables.txt


MohammedU
Go to Top of Page
   

- Advertisement -