Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: float data type
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
![]() |
![]() |