DBAtlas · Database operations atlas

ORA-01438: value larger than specified precision allowed for this column

Oracle

What does it mean?

A number exceeding the defined precision and scale limits was written to a NUMBER column. For example, a value with a 3-digit integer part does not fit in a NUMBER(4,2) column.

Why does it happen?

The column's NUMBER(p,s) definition is too narrow for the data; a calculation result is larger than expected; the decimal scale reduces the digits left for the integer part (NUMBER(5,3) allows only 2 integer digits).

How to fix it

Widen the column capacity to match the real data range: ALTER TABLE my_table MODIFY (my_column NUMBER(12,2)); Round the value in the application, or fit it to the scale with ROUND/TRUNC. To find the overflowing row, narrow down your query while testing, and add input validation.

Open in DBAtlas →

More from this engine