开发者

How does SQL server compress NULL bit datatypes? [duplicate]

This question already has answers here: Closed 11 years ago.

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, w开发者_StackOverflow社区hich part is correct, the ability of a bit to be NULL or the compression of 8 bits to a byte?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜