Subject | Re: [firebird-support] Currency |
---|---|
Author | Christian Gütter |
Post date | 2004-04-05T17:34:27Z |
Hi Steffen,
a float.
Here is an exerpt from the Data Definition Guide:
- NUMERIC and DECIMAL datatypes that are declared without either
precision or scale are stored as INTEGER.
- Defined with precision, with or without scale, they are stored
as SMALLINT, INTEGER, DOUBLE PRECISION or 64-bit integer. Storage
type depends on both the precision and the dialect of the database.
So one does not be afraid of NUMERIC as currency type.
Christian
> I use INTEGER, counted in Cent.This is not true. NUMERIC is a fixed-decimal datatype and not
> (Anyway, the main reason is to be able to multiply and add them without
> having to think about rounding, (as I do this in Java and afaik Numeric and
> Double need to be taken as floats))
a float.
Here is an exerpt from the Data Definition Guide:
- NUMERIC and DECIMAL datatypes that are declared without either
precision or scale are stored as INTEGER.
- Defined with precision, with or without scale, they are stored
as SMALLINT, INTEGER, DOUBLE PRECISION or 64-bit integer. Storage
type depends on both the precision and the dialect of the database.
So one does not be afraid of NUMERIC as currency type.
Christian