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.
| Author |
Topic |
|
R44
Starting Member
8 Posts |
Posted - 2011-08-29 : 14:45:19
|
| Hi all,i have one query ,in my database Transaction table is there , in that 10000 records are there , how to check the size of the each row |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2011-08-29 : 14:47:59
|
| What do you mean by size? When you say Record do you mean Row or do you mean Column? I assume Row, so do you want the Bytes of a row? |
 |
|
|
R44
Starting Member
8 Posts |
Posted - 2011-08-29 : 14:54:20
|
| yes, row |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2011-08-29 : 15:02:02
|
I've seen a lot of methods that are close, like using sp_help or DBCC SHOWCONTIG WITH TABLERESULTS. But ultimately, it seems you have to do a bunch of math depending on the datatypes. This link might help with that:http://msdn.microsoft.com/en-us/library/aa933068.aspxPerhaps you can use the DATALENGTH function to get what you need. Something like:SELECT DATALENGTH(Col1) + DATALENGTH(Col2) + DATALENGTH(Coln), *FROM TableName |
 |
|
|
|
|
|