Firebird 2.5 Language ReferenceFirebird 2.5 Language ReferenceData Types and Subtypes → Floating-Point Data Types
Firebird Firebird Prev: Integer Data TypesFirebird 2.5 Language ReferenceUp: Data Types and SubtypesNext: Fixed-Point Data Types

Floating-Point Data Types

Table of Contents

FLOAT
DOUBLE PRECISION

Floating-point data types are examples of data stored in the DBMS with the precision matching the scale of the number. FLOAT and DOUBLE PRECISION (DOUBLE) are examples.

Considering the peculiarities of storing floating-point numbers in a database, these data types are not recommended for storing monetary data. For the same reasons, columns with floating-point data are not recommended for use as keys or to have uniqueness constraints applied to them.

For testing data in columns with floating-point data types, expressions should check using a range, for instance, BETWEEN, rather than searching for exact matches.

When using these data types in expressions, extreme care is advised regarding the rounding of evaluation results.

FLOAT

This data type has an approximate precision of 7 digits after the decimal point. To ensure the safety of storage, rely on 6 digits.

DOUBLE PRECISION

This data type is stored with an approximate precision of 15 digits.

Prev: Integer Data TypesFirebird 2.5 Language ReferenceUp: Data Types and SubtypesNext: Fixed-Point Data Types
Firebird 2.5 Language ReferenceFirebird 2.5 Language ReferenceData Types and Subtypes → Floating-Point Data Types