NUMERIC
NUMERIC [(precision [, scale])]
Parameter | Description |
---|---|
precision |
Precision, between 1 and 38.Defaults to 9. |
scale |
Scale, between 0 and precision.Defaults to 0. |
Further to the explanation above, Firebird will store NUMERIC
data according the declared precision and scale.Some more examples are:
NUMERIC(4) stored as SMALLINT (exact data) NUMERIC(4,2) SMALLINT (data * 102) NUMERIC(10,4) (Dialect 1) DOUBLE PRECISION (Dialect 3) BIGINT (data * 104) NUMERIC(38,6) INT128 (data * 106)
Caution
|
Always keep in mind that the storage format depends on the precision.For instance, you define the column type as |