I got ” ORA-01401 inserted value too large for column ” error in Oracle database.
ORA-01401 inserted value too large for column
Details of error are as follows.
ORA-01401 inserted value too large for column Cause: The value entered is larger than the maximum width defined for the column. Action: Enter a value smaller than the column width or use the MODIFY option with ALTER TABLE to expand the column width.
inserted value too large for column
This ORA-01401 error is related to the value entered is larger than the maximum width defined for the column.
Enter a value smaller than the column width or use the MODIFY option with ALTER TABLE to expand the column width.
For example; I have created test table and id column has NOT NULL constraint as follows.
CREATE TABLE TEST_TABLE ( id NUMBER(2) NOT NULL, name VARCHAR2(10) );
When you insert more than 10 characters value, you will get this error.
INSERT INTO TEST_TABLE (id, name) VALUES (1,'Mehmet Salih'); ORA-01401 inserted value too large for column
To solve this error, Enter a value smaller than the column width or use the MODIFY option with ALTER TABLE to expand the column width as follows.
INSERT INTO TEST_TABLE (id, name) VALUES (1,'Mehmet');
OR modify Column size as follows.
alter table TEST_TABLE modify name VARCHAR2(20);
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )