Home » SQL & PL/SQL » SQL & PL/SQL » Number data type issue (oracle9i)
Number data type issue [message #394578] Fri, 27 March 2009 19:42 Go to next message
shrinika
Messages: 306
Registered: April 2008
Senior Member
I created the table with NUMBER data type. I inserted the number with 54 digit. When i select the data,
it is showing 40 numbers with 14 trailing zeros.. I thought, it rounds to 38 digits... But it is not...
I am using oracle9i version here... Please help me to clarify this..


SQL> create table test(no number);

Table created.

SQL>
SQL> insert into test values(123456789123456789123456789123456789123456789123456789);

1 row created.

SQL> select * from test;

NO
---------------------------------------------------------
123456789123456789123456789123456789123500000000000000
Re: Number data type issue [message #394582 is a reply to message #394578] Fri, 27 March 2009 20:34 Go to previous messageGo to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
not sure if that is affected by numformat / numwidth on sqlplus.
Re: Number data type issue [message #394836 is a reply to message #394582] Mon, 30 March 2009 08:30 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If you look here you'll see that NUMBER datatypes are stored to a precision of 38 digits, which is what you're seeing.
Previous Topic: How to insert dynamically through a variable in PL/SQL??
Next Topic: Select Query - Case When?
Goto Forum:
  


Current Time: Fri Feb 07 20:42:42 CST 2025