Bit Field

  • Hello Friends,

    I was wondering how much space a BIT field takes. 1 Byte? 1 BIT?

    I don't think it takes only 1 bit because a BIT field can be 0, 1 or NULL. and a bit (1/8 of a Byte) can be only 0 or 1.

    Does anybody has a clue?

    Thanks,

    Luiz.

  • Bit fields take 1 byte for up to 8 fields. So, if you have 1 bit field in a table, it takes 1 byte. If you have 8, it takes 1 byte. 9 is 2 bytes. And so on.

    Then, you have a certain amount of overhead that every column has. There is some associated with storing null columns, etc.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks GSquared

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply