5

Possible Duplicate:
Can Microsoft store three-valued fields in a single bit?

According to the documentation for bit, the bit datatype can have three values, 0, 1 and NULL and if there are 8 or less bit columns in a table, those columns will be compressed into one byte.

These two behaviors seem contradictory. If so, which part is correct, the ability of a bit to be NULL or the compression of 8 bits to a byte?

Community
  • 1
  • 1
kubi
  • 48,104
  • 19
  • 94
  • 118

1 Answers1

2

NULL values are handled by a separate bit for each column (for example look here for details).

TToni
  • 9,145
  • 1
  • 28
  • 42