About NUMERIC and DECIMAL Data Types
Go Up to Method One: In-place Migration
If you back up a
DECIMAL column with a precision greater than 9 (for example,
NUMERIC(12,2)) in an InterBase 5 or earlier database and restore the database as InterBase 6 and later, the column is still stored as
DOUBLE PRECISION. Because InterBase does not allow data type conversions that could potentially result in data loss, you cannot use the
ALTER COLUMN statement to change the column data type from
DOUBLE PRECISION to
INT64. To migrate a
DOUBLE PRECISION column to an
INT64 column, you must create a new
INT64 column and copy the contents of the older column into it.
In InterBase 6 and later dialect 3, when you create a
DECIMAL column with a precision of greater than 9, data in it is automatically stored as an
INT64 exact numeric.
If you want
DECIMAL data types with a precision greater than 9 to be stored as exact numerics, you must take some extra steps after migrating to dialect 3. The following sections tell you how to decide whether you really need to take these steps and how to perform them if you decide you want the exact numerics.
- Do you really need to migrate your NUMERIC and DECIMAL Data Types?
- Migrating NUMERIC and DECIMAL Data Types