Subject | Re: [ib-support] int64 (numeric(18,0)) 64-bit numeric range |
---|---|
Author | Geoff Worboys |
Post date | 2002-01-25T08:47:09Z |
> But with a max of length of 18 digits using NUMERIC(18,0), it'sThe limits of a signed 64bit integer are:
> impossible to even have a positive value of 2^60.
-9223372036854775808 to +9223372036854775807
You can store any of the above range in a NUMERIC(18,0) column - not
that I've been through and checked everyone :-) but the limits work.
IB/FB does not validate the defined precision. The only validation
is whether the value will fit within the storage size allocated
for that precision - 2 bytes for NUMERIC(1..4), 4 bytes for
NUMERIC(5..9) and 8 bytes for NUMERIC(10..18).
If you wish to limit inputs to the defined precision you have to apply
appropriate constraints against the domain.
hth
--
Geoff Worboys
Telesis Computing