更新时间:2023-01-30 16:01:09
DECIMAL
声明的第一位数字是总数位数字.您可能要使用DECIMAL (4, 2)
.这样最多可以在小数点前两位和后两位.
The first digit of the DECIMAL
declaration is the total digits. You probably want to use DECIMAL (4, 2)
. This allows for up to two digits before the decimal and two after.
文档: https://dev. mysql.com/doc/refman/5.7/en/precision-math-decimal-characteristics.html