Convert the non-decimal numeric operand
converts all operands that are not already DECIMAL (or decimal) to DECIMAL before it performs the arithmetic operation.
The following list shows the precision and scale that uses
for the non-DECIMAL operand.
- Operand type
- Convert to
- FLOAT
- DECIMAL(17)
- SMALLFLOAT
- DECIMAL(9)
- INTEGER
- DECIMAL(10,0)
- SMALLINT
- DECIMAL(5,0)
does not consider leading or trailing zeros as significant digits. Leading or trailing zeros do not contribute to the determination of precision and scale. If the operation is addition or subtraction, adds trailing zeros to the operand with the smaller scale until the scales are equal.