Subject RE: [firebird-support] Re: NUMERIC and DECIMAL
Author Rick Debay
Actually, NUMERIC is stored as smallint and DECIMAL as integer.

Numeric(5,2) is an EXACTLY five digit number, with two of the digits
after the decimal point.
Decimal(3,2) is a number with at LEAST three digits, with two of the
digits after the decimal point. The number of digits is allowed to grow
to whatever the internal implementation is.

In Firebird 1.5, Numeric is treated as Decimal in that it is allowed to
have a higher precision. I'd advise you to wrap the data type in a
domain, and place a range constraint on the number.

Rick DeBay

-----Original Message-----
[] On Behalf Of Adam
Sent: Monday, October 03, 2005 8:26 PM
Subject: [firebird-support] Re: NUMERIC and DECIMAL

--- In, "zaher dirkey" <zaher@d...>
> Is numeric(5, 2) equal to decimal(3, 2) or what the deff between

If you have The Firebird Book, pg 132-135. It depends on the dialect
etc, so what are you trying to store?

Numeric(5,2) would be stored internally as integer in dialect 1 & 3.
Decimal(3,2) would be stored internally as a smallint in dialect 1 & 3.

So I don't imagine they are equivalent. That said, they may equally
serve your requirement.


------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!


Visit and click the Resources item on
the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at


Yahoo! Groups Links