Numeric

NUMBER(n,m) accepts numeric data, including zero, negative, and positive numbers.

n specifies the maximum number of digits on either side of the decimal point. m specifies the total number of digits to the right of the decimal point. Both n and m are optional. n defaults to the maximum value. m defaults to zero. The value for n can range from 1 to 38. The value for m can range from -84 to 127.

Examples of NUMBER Precision and Scale

DatatypeValue EnteredValue Stored As
NUMBER1.231.23
NUMBER(2)4.565
NUMBER(5,2)1.231.23
NUMBER(5,2)4.56784.57
NUMBER(3,2)99.56Error code ORA-01438: "value larger than specified precision allowed for this column".
NUMBER(5,-2)1056.341100

NUMBER Datatype Examples

ExampleDescription
NUMBER(4)An integer with a maximum length of four digits
NUMBER(6,2)A number with a maximum precision of six digits; at most two digits behind the decimal point
NUMBER(7,-3)A multiple of thousand with at most seven digits NUMBER Identical to NUMBER(38,*)
NUMBER(*,5)Identical to NUMBER(38,5)
Home »
Oracle »
Data types » 

Related: