INT - Signed integer or decimal number
ODABA considers decimal values the same way as binary values by defining a size and a precision. The size for an integer value defines the number of significant digits. The precision defines the number of positions behind the decimal point. Negative precision allow defining a decimal factor. Both, precision and positions describe the decimal presentation of the value, i.e. int(6,2) defines decimal numbers between -9999.99 and +9999.99. Nevertheless, integer values are stored as binary numbers.
The storage size for integer numbers results from the defined size for the integer:
- 1 - 3: 1 byte
- 4 - 5: 2 byte
- 6 - 10: 4 byte
- 11 - 19: 8 byte
In ODL you may, however, also define the standard names for integer values, which is converted automatically into size and precision.
INT(5,2) defines numbers with three digits before the decimal point and two digits after.
INT(5,-3) defines numbers with five digits that must be multiplied with 1000 (appending 3 zeros), i.e. you may store values between 1000 and 99999000 in the field.