December 1, 2004 at 3:44 pm
Gurus-
I have a basic question. If I have an INT column in a table that is nullable, and if I leave it NULL, will it still use 4 bytes?
Appreciate your responses
December 1, 2004 at 7:31 pm
Yes
December 2, 2004 at 6:32 am
And that was a basic answer
December 2, 2004 at 9:07 am
Thanks guys
December 3, 2004 at 1:15 am
I might be wrong, ( i left my inside sql server 2000 book at work ) but I think if that is you only nullable column it will actually add 5 bytes to the row length. If I remember correctly, sql server uses a bit array to store the nullability state of each column, but only if there are nullable columns.
Ian Dundas
Senior IT Analyst - Database
Manitoba Public Insurance Corp.
December 3, 2004 at 3:05 am
Not exactly, the NULL bitmap is always there, even if no column allows for NULL.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply