Hide
In operations with multiple operands (e.g. the operators +,-,/,*) the operands are implicitly converted to the biggest occurring data type (e.g. DOUBLE is bigger than DECIMAL) before executing the operation. This rule is also called numeric precedence.

Numeric overflow can occur and result in a data exception - numeric value out of range.

The result for this specific calculation would be decimal(36,12).

Regularly the precision and scale were added.

Examples:

- (12,0) * (15,3) = (27,3)
- (12,0) * (15,9) = (27,9)
- (18,3) * (18,9) = (36,12)

For sums the scale is taken from the factor with the highest preciseness.

- (12,0) + (15,9) = (22,9)
- (15,3) + (15,9) = (22,9)

Show
In operations with multiple operands (e.g. the operators +,-,/,*) the operands are implicitly converted to the biggest occurring data type (e.g. DOUBLE is bigger than DECIMAL) before executing the operation. This rule is also called numeric precedence.
Numeric overflow can occur and result in a data exception - numeric value out of range.
The result for this specific calculation would be decimal(36,12).
Regularly the precision and scale were added.
Examples:
(12,0) * (15,3) = (27,3)
(12,0) * (15,9) = (27,9)
(18,3) * (18,9) = (36,12)
For sums the scale is taken from the factor with the highest preciseness.
(12,0) + (15,9) = (22,9)
(15,3) + (15,9) = (22,9)