Earlier at work I spent one hour trying to understand why I was unable to insert some data in a table – Oracle Database.
More specifically I was trying to insert a number value (BigDecimal(100)) from a Java application, but I always got the follow error: “ORA-01438: value larger than specified precision allowed for this column”.
I thought “Ok, let’s check the column’s properties and confront that with the value I’m trying to insert…”
The column was created with this configuration: NUMBER(15,13)
So, I thought that the first parameter was the number of digits before de decimal point, and the other parameter was the number of digits after de decimal point.
I was so wrong… =[
I’ll never insert the value 100.
That is the answer:
Optionally, you can also specify a precision (total number of digits) and scale (number of digits to the right of the decimal point):column_name NUMBER (precision, scale)
If a precision is not specified, the column stores values as given. If no scale is specified, the scale is zero.
Link to the reference
There’s so much to learn litle padawan… =)