Contents Index DOUBLE data type [Numeric] INT or INTEGER data type [Numeric]

ASA SQL Reference
  SQL Data Types
    Numeric data types

FLOAT data type [Numeric]


Function 

A floating point number, which may be single or double precision.

Syntax 

FLOAT [ ( precision ) ]

Usage 

When a column is created using the FLOAT ( precision ) data type, columns on all platforms are guaranteed to hold the values to at least the specified minimum precision. In contrast, REAL and DOUBLE do not guarantee a platform-independent minimum precision.

If precision is not supplied, the FLOAT data type is a single precision floating point number, equivalent to the REAL data type, and requires 4 bytes of storage.

If precision is supplied, the FLOAT data type is either single or double precision, depending on the value of precision specified. The cutoff between REAL and DOUBLE is platform-dependent. Single precision FLOATs require 4 bytes of storage, and double precision FLOATs require 8 bytes.

The FLOAT data type is an approximate numeric data type. It is subject to round-off errors after arithmetic operations. The approximate nature of FLOAT values means that queries using equalities should generally be avoided when comparing FLOAT values.

Parameters 

precision    An integer expression that specifies the number of bits in the mantissa. A mantissa is the decimal part of a logarithm. For example, in the logarithm 5.63428, the mantissa is 0.63428. The IEEE standard 754 floating-point precision is as follows:

n Decimal precision Equivalent SQL data type Storage size
1-24 7 decimal digits REAL 4 bytes
25-53 15 decimal digits DOUBLE 8 bytes
Standards and compatibility 
See also 

DECIMAL data type [Numeric]

REAL data type [Numeric]

DOUBLE data type [Numeric]


Contents Index DOUBLE data type [Numeric] INT or INTEGER data type [Numeric]