I'm using MySQL version 5.1.49-1ubuntu8.1. It allows me to define columns of two different data types: BOOL
and BOOLEAN
. What are the differences between the two types?
They are both synonyms for TINYINT(1).
As established in other comments, they're synonyms for TINYINT(1).
*So, why do they bother differentiating between bool, boolean, tiny*int(1)?
Mostly semantics.
Bool and Boolean: MySQL default converts these to the tinyint type. Per a MySQL statement made around the time of this writing, "We intend to implement full boolean type handling, in accordance with standard SQL, in a future MySQL release."
0 = FALSE 1 = TRUE
TINYINT: Occupies one byte; ranges from -128 to +127; or, 0 – 256.
Commonly brought up in this comparison: After MySQL 5.0.3 -- Bit: Uses 8 bytes and stores only binary data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With