eXtremeSQL understands the standard SQL type
NUMERIC. It storesNUMERICfields internally as 8 byte integer values with a specified width and precision. When performing operations (in SQL statements) on database fields, and converting the resulting values to result set rows, the precision of the result is determined by the following rules (whereP1andP2represent the precision of the operands):
Operation Result Precision P1+ P2max(P1,P2)P1- P2max(P1,P2)P1* P2P1+P2P1/ P2max(P1-P2, 0)Also, when
NUMERICvalues are compared, the precision of the result ismax(P1,P2).