-
ORA-01400: cannot insert NULL into
Why can't I insert a blank string into a NOT NULL colum?
insert into t1 values(2,'');
ORA-01400: cannot insert NULL into ("TEST1"."T1"."C2")
My table is:
create table t1(c1 int,c2 varchar2(10) not null);
Any idea?
-
for Oracle a blank string is a NULL. So you will not be able to insert a blank into a NOT NULL column
-
You add a NOT NULL constraint and then inserting a NULL value??
Are you trying to do something like this?
insert into t1 values(2,' ');
This will work as there is a space.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|