MySQL bit and binary are both data types used for storing binary data. However, there are some differences between them. The bit data type is used for storing a fixed-length sequence of bits. It can be used to represent boolean values, where 0 represents
MySQL bit and binary are both data types used for storing binary data. However, there are some differences between them. The bit data type is used for storing a fixed-length sequence of bits. It can be used to represent boolean values, where 0 represents
我们可以使用binary
或bit
(最多64位)来存储二进制值。
使用binary(n)
和bit(m)
(其中n
= 8 × m
)有什么区别?
MySQL是否将它们视为相同的东西?