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: Q: float data type

Re: Q: float data type

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 8 Sep 1999 20:34:17 +0100
Message-ID: <936819642.3955.0.nnrp-12.9e984b29@news.demon.co.uk>

Oops, I think I'll withdraw that comment about surviviability. I'd forgotten that it was possible to define a table column
with as an unqualified NUMBER,

i.e.

    create table t1 (

        n1    number,
        f1    float

    );

    desc t1


    N1            NUMBER
    F!             FLOAT(126)


in this case, with no precision and no
scale, the decimal point on NUMBER type can move as far left or right as required (up to about 126 places I think).

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Jonathan Lewis wrote in message
<936803100.22623.0.nnrp-10.9e984b29_at_news.demon.co.uk>...
>There is an interesting difference though.
>You (implicitly) specify a decimal place
>in number(p,s), but a float(n) has only
>a precision which can 'float'.
>
>Create table t1 (n1 float(12));
>insert into t1 values (12345);
>insert into t1 values (0.12345);
>
>select * from t1;
>--------
> 123450
> 0.1235
>
>Given sufficiently extreme arithmetic,
>float(N) can survive longer than number(p,s)
>
>--
>
>Jonathan Lewis
>Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
>Thomas Kyte wrote in message ...
>
>>No, I think I would want to use numbers with 38 digits of precision/scale.
>The
>>Oracle number type has more precision/scale then a float type does.
>>
>
>
>
Received on Wed Sep 08 1999 - 14:34:17 CDT

Original text of this message

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