Different numeric data types have different levels of precedence in operations. In ApsaraDB for OceanBase, BINARY_DOUBLE has the highest precedence, followed by BINARY_FLOAT, and finally by NUMBER.
In any operation on multiple numeric values:
If an operand is
BINARY_DOUBLE, ApsaraDB for OceanBase converts all operands toBINARY_DOUBLEbefore performing the operation.If an operand is
BINARY_FLOAT, ApsaraDB for OceanBase converts all operands toBINARY_FLOATbefore performing the operation.If none of the operands is
BINARY_DOUBLEorBINARY_FLOAT, ApsaraDB for OceanBase converts all operands toNUMBERbefore performing the operation.If the required conversion fails, the operation fails.
In the context of other data types, numeric data types have lower precedence than the date, time, and interval data types, and have higher precedence than character and all other data types.