Subject | RE: [firebird-support] BIGINT Vs Numeric(18,0) |
---|---|
Author | Alan McDonald |
Post date | 2004-04-16T11:08:13Z |
> Even NUMERIC(18,0) would take 19 digits - depending onThanks Geoff
> 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
Alan