Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: NUMBER Vs NUMBER(38)

Re: NUMBER Vs NUMBER(38)

From: <markp7832_at_my-deja.com>
Date: Wed, 25 Aug 1999 20:12:48 GMT
Message-ID: <7q1inl$bs1$1@nnrp1.deja.com>


In article <37C43B61.E2A2D276_at_bigfoot.com>,   Doug Cowles <dcowles_at_bigfoot.com> wrote:
> That's not quite right - you can insert floating point values in a
> NUMBER(38) as well.
> There is actually no difference as far as internal storage goes. The
> number 567 will consume the same amount of storage in both. It is
more
> meaningful for the application
> to indicate what the precision is, but both cases they contain 38
digits
> of precision.
>
> Michel Cadot wrote:
>
> > NUMBER is a floating point number with precision of about 38 digits
> > in the ranges:
> > range -9.9999999999999999999999999999999999999x10^125 to -1x10^-130
;
> > 0 ;
> > range 1x10^-130 to 9.9999999999999999999999999999999999999x10^125
> >
> > NUMBER(38) is an integer of 38 digits max.
> >
> > Nandakumar a écrit dans le message <7ps95q$jhf$1_at_nnrp1.deja.com>...
> > >Is there any difference between datatype declarations
> > >NUMBER and NUMBER(38)?
> > >--
> > >Nandakumar
> > >(N.Kumar_at_rocketmail.com)
> > >
> > >
> > >Sent via Deja.com http://www.deja.com/
> > >Share what you know. Learn what you don't.
>

Doug, you might want to review the select results. Inserting a decimal into a number(xx) is one thing. How Oracle stores it is another.

OPS2> create table marktest (fld1 number, fld2 number(38) );

Table created.

OPS2> insert into marktest values (567.66,0);

1 row created.

OPS2> insert into marktest values (0,567.66);

1 row created.

OPS2> select * from marktest;

      FLD1 FLD2
---------- ----------

    567.66          0
         0        568


--
Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Aug 25 1999 - 15:12:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US