Icon Approximate Numeric Types

Approximate numeric types are used when you wish to store a numeric value in an approximate representation with a floating decimal point. Using approximate numeric types can cause rounding errors due to the fact that certain numbers such as 0.33 cannot be accurately represented using floating-point precision.

TypeDescription
DOUBLE PRECISIONA 64-bit, floating-point numeric value with a maximum precision of 16 digits.
FLOAT[(<Precision>)]A 64-bit, floating-point numeric value with a maximum precision of 16 digits. The precision is ignored if specified.

Literals
Approximate numeric literals use the period (.) as the decimal point character, the minus (-) as the negative sign character, the plus (+) as the positive sign character, and scientific notation is supported via E (e or E) as the exponent character followed by a plus (+) or minus (-) character and the actual exponent value.

Literal Examples
-- This example specifies a FLOAT literal

SELECT * FROM Orders WHERE Amount > 100.00

-- This example specifies a FLOAT literal using
-- scientific notation

SELECT * FROM Planets WHERE Distance > 100E+10

SQL 2003 Standard Deviations
The following areas are where ElevateDB deviates from the SQL 2003 standard:

DeviationDetails
REAL TypeElevateDB does not support the REAL type. Use the DOUBLE PRECISION or FLOAT type instead.
Image