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 |
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-05-11 : 03:21:33
|
| If a table has two columns and two rows, columns areID int,T1 float and both the rows contain NULL valueswhat would be the size of each row?Will row size would be the addition of its column's data type even if there is NULL, or row size will be calculated only if there is data in columns? |
|
|
Beachsandintoes
Starting Member
15 Posts |
Posted - 2005-05-11 : 17:59:13
|
| Hi,Int and float are fixed length data types which means space is allocated even if the columns are null. FYI: An Int(eger) is 4 bytes, a float is 4 bytes, and a double float is 8 bytes.If you are trying to calculate how many records will fit in a page then you should also know that:- SQL server doesn't split a record across pages (Note: I believe this is true but you should confirm)- Additional space is allocated per row for a row header and to track null columns- Additional space is allocated for page header info that maintains information about the pageI hope this helps.- Beach |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|