This topic created in 4816 days ago, the information mentioned may be changed or developed.
请问,MySQL中DECIMAL类型的小数点是否占用空间?比如DECIMAL(9,9)是占用8个字节还是9个字节?
3 replies • 1970-01-01 08:00:00 +08:00
 |
|
按总数算,一个9个digit,因此用4字节存放。
|
 |
|
我的问题写错了,是DECIMAL(18,9)
|
 |
|
18 // 9 = 2 18 % 9 = 0 2*4=8字节
|