Was this helpful?
Numeric Literals
Numeric literals specify numeric values. There are two types of numeric literals: integer and floating point.
You can assign a numeric literal to any of the numeric data types or the money data type without using an explicit conversion function. The DBMS Server automatically converts the literal to the appropriate data type, if necessary.
By default, the period (.) indicates the decimal point. You can change this default by setting II_DECIMAL. For information about setting II_DECIMAL, see the System Administrator Guide.
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 i4 or a i2, depending on the value of the literal. If the literal is within the range -32,768 to +32,767, it is represented as a i2. If its value is within the range -2,147,483,648 to +2,147,483,647 but outside the range of a i2, it is represented as an i4.
You can specify integers 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 you can use exponential notation as follows:
Floating Point Literals
A floating point literal must be specified using scientific notation. The format is:
[+|-] {digit} [.{digit}] e|E [+|-] {digit}
For example:
2.3 e-02
You must specify at least one digit, either before or after the decimal point.
Last modified date: 06/10/2024