DECIMAL data type: Fixed-point data

When you define a column with the DECIMAL(p,s) data type, the syntax of this definition specifies a fixed-point value for the column. This value has a total of p (<= 32) significant digits (the precision) and s (<= p) digits to the right of the decimal point (the scale).

Tip: The DECIMAL data type can also declare a floating-point value with the syntax DECIMAL(p).
The SQL DECIMAL data type holds the internal (binary) format of a decimal value. This value is a computer-independent method that represents numbers of up to 32 significant digits, with valid values in the range 10-129 - 10+125.
Tip: The internal format of the DECIMAL data type is often referred to as its binary representation.

The DataBlade® API supports the SQL DECIMAL data type with the mi_decimal data type. Therefore, the mi_decimal data type also holds the binary representation of a decimal value. The mi_numeric data type is a synonym for mi_decimal.

Values of the mi_decimal data type cannot fit into an MI_DATUM structure. They must be passed by reference within C UDRs.

All data types, including mi_decimal, must be passed by reference within client LIBMI applications.