Integer Literals
Integer literals are specified by a sequence of up to 10 digits and an optional sign, in the following format:
[+|‑] digit {digit} [e digit]
Integer literals are represented internally as either an integer or a smallint, depending on the value of the literal. If the literal is within the range ‑32,768 to +32,767, it is represented as a smallint. If its value is within the range ‑2,147,483,648 to +2,147,483,647 but outside the range of a smallint, then it is represented as an integer. Values that exceed the range of integers are represented as decimals.
Integers can be specified using a simplified scientific notation, similar to the way floating-point values are specified. To specify an exponent, follow the integer value with the letter “e” and the value of the exponent. This notation is useful for specifying large values. For example, to specify 100,000 use the following exponential notation:
1e5
Decimal Literals
Decimal literals are specified as signed or unsigned numbers of 1 to 39 digits that include a decimal point. The precision of a decimal number is the total number of digits, including leading and trailing zeros. The scale of a decimal literal is the total number of digits to the right of the decimal point, including trailing zeros. Decimal literals that exceed 39 digits are treated as floating-point values.
Examples of decimal literals are:
3.
‑10.
1234567890.12345
001.100