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: <tedchyn_at_yahoo.com>
Date: Fri, 03 Sep 1999 15:55:43 GMT
Message-ID: <7qor1o$j9r$1@nnrp1.deja.com>


Thomas,
1. what about internal storage how many bytes for number and float if no

    number specified -e.g. column_1 float, column_2 number ? 2. Is there any shortcoming in defining a column with float ? 3. why select display 120000 instead of 123456 for float(6) in your example ?
Thanks
Ted Chyn(tedchyn_at_yahoo.com)

In article <t8XPN68EtajHNwjVVEiclp8wBy9Q_at_4ax.com>,   tkyte_at_us.oracle.com wrote:
> A copy of this was sent to tedchyn_at_yahoo.com
> (if that email address didn't require changing)
> On Thu, 02 Sep 1999 20:41:26 GMT, you wrote:
>
> >Sir, Is there differences between data type number and data type
> >float in defining a table ? number is well document in oracle manual
and
> >float is not. Any comments is appreciated.
> >
>
> big difference.
>
> tkyte_at_8.0> create table t ( x number(6), y float(6) );
>
> Table created.
>
> tkyte_at_8.0>
> tkyte_at_8.0> insert into t values ( 123456, 123456 );
>
> 1 row created.
>
> tkyte_at_8.0> select * from t;
>
> X Y
> ---------- ----------
> 123456 120000
>
> a float 6 can hold 2 digits of precision.
> a float 16 is like a C float -- it can hold about 6 digits of
precision.
>
> >Thanks Ted Chyn(tedchyn_at_yahoo.com)
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Share what you know. Learn what you don't.
>
> --
> See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to
Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated
June 21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle
Corporation
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Sep 03 1999 - 10:55:43 CDT

Original text of this message

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