Java Tech Enthusiast
Jul 24, 2024 · Databases
Differences Between MySQL TINYINT(1) and BIT(1) for Boolean Storage
MySQL’s TINYINT(1) stores a full byte integer allowing any value from 0‑255 (or –128‑127 signed) and works with arithmetic, offering broad compatibility, while BIT(1) stores a single bit limited to 0 or 1, is MySQL‑specific, and is best used only when true/false storage and minimal space are essential, making TINYINT(1) the generally preferred choice unless strict boolean constraints apply.
BitBooleanData Types
0 likes · 4 min read