What is the dif开发者_如何学Pythonference between BIT and BOOLEAN?
tinyint(1) is an integer type with a defined display width of 1. The BIT data type represents bit-field values which can have from 1 to 64 bits.
The storage size of tinyint is always 1 byte while the storage size of BIT(n) is approximately INT((n+7)/8) bytes
You can write to a BIT field using a special notation e.g. b'1111', don't think you can use this with INT/TINYINT fields
精彩评论