When you encounter an ORA-01400 error, the following error message will appear:
ORA-01400: cannot insert NULL into ("SCHEMA"."TABLE_NAME"."COLUMN_NAME")
This is caused when you try to insert a NULL value into a column that does not accept NULL values.
SOLUTION to resolve this Oracle error is:
1) To Correct your INSERT statement so that you do not insert a NULL value into a column that is defined as NOT NULL.
For example, if you had a table called suppliers defined as follows:
CREATE TABLE suppliers
( supplier_id number not null,
supplier_name varchar2(50) not null );
And you tried to execute the following INSERT statement:
INSERT INTO suppliers
( supplier_id )
VALUES
( 10567 );
You have defined the supplier_name column as a NOT NULL field. Yet, you have attempted to insert a NULL value into this field. Provide the value for this field and try.
Challa.
No comments:
Post a Comment