What is the default Precision and Scale for a Number in Oracle?
Solution 1:
NUMBER (precision, scale)
If a precision is not specified, the column stores values as given. If no scale is specified, the scale is zero.
A lot more info at:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT1832
Solution 2:
The NUMBER
type can be specified in different styles:
Resulting Resulting Precision Specification Precision Scale Check Comment ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― NUMBER NULL NULL NO 'maximum range and precision', values are stored 'as given' NUMBER(P, S) P S YES Error code: ORA-01438 NUMBER(P) P 0 YES Error code: ORA-01438 NUMBER(*, S) 38 S NO
Where the precision is the total number of digits and scale is the number of digits right or left (negative scale) of the decimal point.
Oracle specifies ORA-01438 as
value larger than specified precision allowed for this column
As noted in the table, this integrity check is only active if the precision is explicitly specified. Otherwise Oracle silently rounds the inserted or updated value using some unspecified method.