Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: NUMBER datatype
> -----Original Message-----
> From: paquette stephane [mailto:stephane_paquette_at_yahoo.com]
> Sent: mercredi, 7. mars 2001 00:31
> To: Multiple recipients of list ORACLE-L
> Subject: RE: NUMBER datatype
>
>
> Hi Steve,
>
> I posted that question a couple of days ago but got no
> answer. Do you agree that if I create a table with
> plain number fields instead of number (x,y) I can
> store any value with any precision as long as I do not
> reach Oracle limits ?
Do I understand your question correctly? Yes, a number field can contain any positive or negative number up to a certain precision.
I seem to lose precision after 40 digits.
SQL> create table t (row_num number (2), n number) ;
Table created.
SQL> -- 40-digit number
SQL> insert into t (row_num, n)
2 values (1, 1234567890123456789012345678901234567890) ;
1 row created.
SQL> -- 41-digit number
SQL> insert into t (row_num, n)
2 values (2, 12345678901234567890123456789012345678901) ;
1 row created.
SQL> select row_num,
2 to_char (n, rpad ('9', 50, '9')) as big_num
3 from t ;
ROW_NUM BIG_NUM
---------- ---------------------------------------------------1 1234567890123456789012345678901234567890 2 12345678901234567890123456789012345678900
SQL> select * from v$version ;
BANNER
Jacques R. Kilchoer
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com
Received on Wed Mar 07 2001 - 13:29:51 CST
![]() |
![]() |