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

12 浏览
0 Comments

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

我们可以使用binarybit(最多64位)来存储二进制值。

使用binary(n)bit(m)(其中n = 8 × m)有什么区别?

MySQL是否将它们视为相同的东西

假设使用的是MySQL >= 5.0.3。

0
0 Comments

MySQL中有两种存储位的方式:BIT和BINARY。BIT数据类型在逻辑运算中可能更有用。它们在存储上有一些小差异:BINARY(M)需要精确的字节数M,而BIT类型的长度可能会变化。但是,当我们使用8位的倍数时,比如binary(2)和bit(16),它们之间有什么区别呢?

0