Subject Re: [firebird-support] BIGINT Vs Numeric(18,0)
Author Geoff Worboys
> We graduated from having to declare numeric(18,0) to
> declaring BIGINT. Maybe a dumb question but can someone
> tell me why BIGINT actually takes 19 places? how did we
> get another place or why wasn't it numeric(19,0)?

Even NUMERIC(18,0) would take 19 digits - depending on
the digits 9.2E18 but not 9.3E18. Just like NUMERIC(9,0)
will actually take 10 digits - depending on the digits.

Its called NUMERIC(18,0) because it will accept the total
possible range of 18 digiti numbers. Whereas it will only
accept a partial range of 19 digit numbers.

The restriction is on the storage type rather than on
the declaration. So even NUMERIC(7,0) will accept 9
or 10 digits (depending on the digits).

I wrote any article that touches on this stuff thats
available on the IBO site. It mentions the fact that if
you want NUMERIC(x, y) to really restrict your input to
the declared number of digits then you must also define
an appropriate check constraint.

--
Geoff Worboys
Telesis Computing