View Single Post

   
  #7 (permalink)  
Old 05-16-2008, 01:39 PM
Serge Rielau
 
Posts: n/a
Default Re: size of numeric data

Frank Swarbrick wrote:
>>>> On 5/13/2008 at 5:24 PM, in message

> <7qpWj.134289$Er2.127202@bignews6.bellsouth.net> , Mark
> A<nobody@nowhere.com> wrote:
>> "Frank Swarbrick" <Frank.Swarbrick@efirstbank.com> wrote in message
>> news:48297F5F.6F0F.0085.0@efirstbank.com...
>>> My DBA says that a column defined, for instance, as DECIMAL(11,2) and
>>> containing a value of 1.00 takes up no more space on the database disk
>>> than
>>> a column defined as DECIMAL(7,2) and containing a value of 1.00.
>>>
>>> I am honestly having a hard time believing this, but I don't know where

>> I
>>> can find the answer.
>>> Help?

>> That is true with some databases, but not with DB2 unless you are
>> specifically using compression.

>
> Do you by chance know if Oracle is one of the "some databases"? The DBA is
> an Oracle guy who we also have working on DB2 now.

NUMBER is stored similar to a "VARCHAR". Call it VARDECIMAL if you wish.
That is the storage depends on the number of digits, where trailing 0's
are removed.

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Reply With Quote