ORA-01401 inserted value too large for column

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 )

 

 77 views last month,  2 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply