// Oracle error reference

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
Error message
value larger than specified precision allowed for this column

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 UPDATE that grows past the limit.

How to fix it

  1. 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';
  2. Widen the column.

    ALTER TABLE orders MODIFY (total NUMBER(12,2));

Related errors

More data values and conversion errors

The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.

// fewer errors, faster fixes

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.