SQL-92 includes a decimal data type, which is an exact numeric type for representing fixed point decimal Numbers and performs basic arithmetic operation on decimal Numbers.
SQL- 92包括DECIMAL数据类型,它是用于表示定点小数的精确数字类型,它可以对小数进行基本的算术运算。
If you have no decimal data type available, an alternative is to work with integers, e. g. do money calculations entirely in cents.
如果你没有合适的小数数据类型可用,一个替代的方案是使用整数。比如,在计算钱数时把单位转化为分。
The decimal data type is used to specify a numeric value.
小数数据类型用于指定一个数值。
For instance, the DECIMAL data type can be shortened to DEC or referred to as NUMERIC.
例如,DECIMAL数据类型可以缩短为DEC或表示为NUMERIC。
The price column is created as a DECIMAL data type with a precision of 5 and a scale of 2.
price列创建为DECIMAL数据类型,精度为5,刻度为2。
By default, the scale for a DECIMAL type is 0, which means the DECIMAL data type mimics an integer type.
默认情况下,decimal类型的刻度为0,这意味着DECIMAL数据类型模拟了整数类型。
The storage required for a DECIMAL data type is potentially much larger than it is for a normal floating-point data type.
DECIMAL数据类型需要的存储空间通常要比浮点数据类型大得多。
The storage required for a DECIMAL data type is potentially much larger than it is for a normal floating-point data type.
DECIMAL数据类型需要的存储空间通常要比浮点数据类型大得多。
应用推荐