要创建算术类型,应当指定保存的数据的精度,并可选地指定数据的刻度。
To create a decimal type, you specify the precision and, optionally, the scale for the data to be stored.
price列创建为DECIMAL数据类型,精度为5,刻度为2。
The price column is created as a DECIMAL data type with a precision of 5 and a scale of 2.
默认情况下,decimal类型的刻度为0,这意味着DECIMAL数据类型模拟了整数类型。
By default, the scale for a DECIMAL type is 0, which means the DECIMAL data type mimics an integer type.
应用推荐