The decimal data type (dec) is used to represent 64-bit floating point values.

Columns of type decimal can store information such as:
  • Sales prices (6.95)
  • Unemployment rates (7.1)
  • Interest rates (5.35)

Columns of type decimal are often used to represent values that contain a fractional part, e.g., 1.25, or numbers that fall outside the valid range for columns of type integer.

Use decimal data types when the values need to be represented contain a fractional part, or if they fall outside the valid range for integers, which is -2,147,483,646 to 2,147,483,646. For example, although UPC codes do not have a fractional part, they should be stored as a decimal data type instead of an integer because they are typically 12-digit numbers. Decimal values may be positive or negative.

Numbers cast to decimal data type are computed & stored as IEEE 754 double floating point values. In most cases, the system holds a minimum 15 places of decimal precision. The maximum is roughly 1.7976931348623158e308.

The decimal data type also holds the floating point value that represents the date and time together as a date+time value. For more information, see Date+Time.

In some places in the 1010data Insights platform, the decimal data type (dec) is also represented as f.