Subject RE: [firebird-support] Re: NUMERIC and DECIMAL Rick Debay 2005-10-04T15:05:13Z
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-----
From: firebird-support@yahoogroups.com
Sent: Monday, October 03, 2005 8:26 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: NUMERIC and DECIMAL

--- In firebird-support@yahoogroups.com, "zaher dirkey" <zaher@d...>
wrote:
> Is numeric(5, 2) equal to decimal(3, 2) or what the deff between
> NUMERIC and DECIMAL

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

Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/67folB/TM
--------------------------------------------------------------------~->

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item on