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 |
|
sagitariusmzi
Posting Yak Master
113 Posts |
Posted - 2010-01-08 : 00:27:13
|
| Hi,How to get the Row size of every record / field in a tableRegard |
|
|
balaganapathy.n
Starting Member
18 Posts |
Posted - 2010-01-08 : 01:19:17
|
| Hope this helps.SELECT a.name,sum(a.max_length)as BytesFROM ( SELECT st.name,sc.max_length FROM sys.columns sc inner join sys.tables st on sc.object_id = st.object_id UNION ALL SELECT st.name,sc.max_length FROM sys.indexes si INNER JOIN sys.tables st ON si.object_id = st.object_id inner join sys.columns sc on sc.object_id = st.object_id inner join sys.index_columns sic on sc.object_id = sic.object_id and sc.column_id = sic.column_id ) agroup by a.nameorder by a.name This gives the size (in bytes) of each column in a table.balaganapathy n.Anything you can imagine is real. |
 |
|
|
|
|
|