Skip to Main Content

SQL & PL/SQL

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!

Number datatypes

GusoraMar 29 2013 — edited Mar 30 2013
Okay rather simple question here. When I look at the number datatype declaration for a database table column such as this....

NUMBER 4.56 will be stored as 4.56
NUMBER(2) 4.56 ditto 5
NUMBER(5,2) 4.56 ditto 4.56

NUMBER(p,s), it clearly says in the documentation that if neither is specified p defaults to the max value and s defaults to zero. Then why when I use the first declaration, 4.56 is stored. Surely if the scale is not specified it is zero and the .56 should be knocked off and 5 should be stored?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2013
Added on Mar 29 2013
12 comments
484 views