Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Precision and scale question

chuckersOct 2 2007 — edited Oct 2 2007

So, I was looking through the documentation to see what the difference between NUMBER and INTEGER was, and I came across this def'n of NUMBER which confuses me:

NUMBER(p,s) Number having precision p and scale s. The precision p 
can range from 1 to 38. The scale s can range from -84 to 127. 

How could you ever store a value like

NUMBER (38,127)

If 38 is the max for precision, then NUMBER(38,38) should be the limit. I can define a NUMBER (38,127) - meaning Oracle doesn't throw an error, but I don't know what that means. And I can't seem to insert any values

SQL> create table t (f number(38,127));

Table created.

SQL> insert into t values (1);
insert into t values (1)
                      *
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column


SQL> insert into t values (.1);
insert into t values (.1)
                      *
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column

---=Chuck

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2007
Added on Oct 2 2007
2 comments
922 views