开发者

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

开发者 https://www.devze.com 2023-02-12 18:03 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Can Microsoft store three-valued fields in a single bit?
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

精彩评论

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