ORA-01438: value larger than specified precision allowed for this column
The Oracle error ORA-01438: value larger than specified precision allowed for this column is thrown when trying to insert a numerical value whose value is too large for the specified size in a table definition, see Inserting values that are too large for the column definition.
create table tq84_ora_01438_test (
col_1 number(2) not null,
col_2 number(2) not null,
col_3 number(2) not null,
col_4 number(2) not null,
col_5 number(2) not null
);
insert into tq84_ora_01438_test values(1, 12, 123, 12, 1);
--
-- ORA-01438: value larger than specified precision allows for this column
Oracle 23ai
In 23ai, Oracle seems to be finally able to report a somewhat more meaningful error message:
insert into tq84_ora_01438_test values(1, 12, 123, 12, 1);
--
-- SQL Error: ORA-01438: value 123 greater than specified precision (2, 0) for column
CAST
This error is also thrown when explicitely casting a value like so: