ORA-01438: value larger than specified precision
A number has more digits before the decimal point than the column's NUMBER(precision, scale) allows.
- Error code
ORA-01438- Category
- Data values and conversion
What it means
A NUMBER(p, s) column holds at most p - s digits to the left of the decimal point. ORA-01438 means the value needs more. Digits beyond the scale on the right are rounded, not rejected, so the error is always about the integer part. For example NUMBER(5,2) accepts up to 999.99.
Newer releases show the value and the limit: value value greater than specified precision precision_scale for column column.
Common causes
- A value too big for the column, such as 1000 in
NUMBER(5,2). - Storing a value in the wrong unit, for example cents in a column meant for currency units.
- An arithmetic result in an
UPDATEthat grows past the limit.
How to fix it
-
Check the column's precision and scale.
SELECT column_name, data_precision, data_scale FROM all_tab_columns WHERE table_name = 'ORDERS' AND column_name = 'TOTAL';
-
Widen the column.
ALTER TABLE orders MODIFY (total NUMBER(12,2));
Related errors
ORA-12899value too large for columnORA-01722invalid number8115SQL Server: Arithmetic overflow error converting22003PostgreSQL: numeric value out of range1264MySQL: Out of range value for column
More data values and conversion errors
ORA-01401inserted value too large for columnORA-00932inconsistent datatypesORA-01476divisor is equal to zeroORA-01843not a valid monthORA-01861literal does not match format stringORA-01830date format picture ends before end of input
The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.
Work on Oracle in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.