I have a Java program which stores data in MySQL database in two states. For this purpose I wanted to use BOOLEAN. But whenever I enter BOOLEAN it's getting changed into TINYINT.
Is there any other way to store data in two states?
MySQL uses TINYINT(1) to mimic the behaviour of Boolean type, so make sure you use TINYINT(1) as the data type of your column, not TINYINT.
Alternatively, you can use BOOL or BOOLEAN which are both synonyms for TINYINT(1).
Similarly, the values TRUE and FALSE are merely aliases for 1 and 0, respectively in MySQL.
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