

Note that NUMERIC is a synonym for DECIMAL, and that the documentation for the  NUMERIC data type exactly matches the documentation for this topic.




Must be between 1 and 31. If not specified, the default precision is 5.


Must be less than or equal to the precision. If not specified, the default scale is 0.

Usage Notes

Here are several notes about using the DECIMAL data type:

  • An attempt to put a numeric value into a DECIMAL is allowed as long as any non-fractional precision is not lost. When truncating trailing digits from a DECIMAL value, Splice Machine rounds down. For example:
      -- this cast loses only fractional precision
    values cast (1.798765 AS decimal(5,2));
    	-- this cast does not fit:
    values cast (1798765 AS decimal(5,2));
    ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(5,2).
  • When mixed with other data types in expressions, the resulting data type follows the rules shown in Storing values of one numeric data type in columns of another numeric data type.
  • Integer constants too big for BIGINT are made DECIMAL constants.

Corresponding Compile-time Java Type


JDBC Metadata Type (java.sql.Types)



VALUES 123.456;
VALUES 0.001;