What do you want to do in the end
·I want to store authenticity values in MySQL 5.7
What do you want to know
·Which do you prefer, boolean, bit(1) or tinyint(1)?
About the Q1.boolean literal
·It says that TRUE and FALSE constants are evaluated as 1 and 0 respectively, but is this true for any data type?
"·For example, can ""where field name=true"" be established when selecting not only 1 stored in type tinyint(1) but also 1 stored in type bit(1)?"
Q2.boolean type is exactly the same as tinyint(1) type?
·If you create a field in boolean type, it will be created in type tinyint(1), but does this mean that it is exactly the same as the field created in type tinyint(1) from the beginning?
Q3.boolean type is not bit(1) type?
·Tinyint(1) type may store anything other than 01, so I think bit(1) type which can store only 0 and 1 is more appropriate...
·Is there any reason why the boolean type is treated as a tinyint(1) type?
In MySQL, TRUE as literal, FALSE is treated as 10 when parsing.Therefore, it is exactly the same as specifying 10.
BOOLEAN as a type is similarly treated as TINYINT(1) during parsing.BOOLEAN and TINYINT(1) are exactly the same
I don't know about this.
© 2024 OneMinuteCode. All rights reserved.