Were there performance or compatibility reasons for going with tinyint(1) over an enum? Something else?
It may interest you to know that MySQL indexes ENUMs with integers.
The SQL standard has included a boolean data type since 1999 - with valid values being true, false, unknown, or null. Implementation across various database systems is spotty.
MySQL does not support a true boolean data type - BOOLEAN maps to TINYINT, which takes up only 1 byte. MySQL interprets 0 as false, all other numbers are true.
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