Hi, before all, appreciate any help and sorry about my eglish
I'm a student and my teacher created a schema to me, so i could work with oracle database. It was working well, but today i deleted some tables and added others and when i try to insert something in the new tables it gives me that error.
I read somethings about that error, and some they say do the purge recyclebin solve, but it didn't work for me, it stills giving me that error
even that simple exmple, it gives me error:
create table example(example_id number(10), example_name varchar(255));
insert into example(example_id, example_name) values(1, 'example');
Please help me, i have to do the work but that error is not letting me do it.
SQL> create table example(example_id number(10), example_name varchar(255));
Table created.
SQL> insert into example(example_id, example_name) values(1, 'example');
1 row created.
works fine. Your error is due to something else
SQL> create table T (x int default on null 0 not null );
Table created.
SQL> alter table T modify x null;
alter table T modify x null
*
ERROR at line 1:
ORA-01451: column to be modified to NULL cannot be modified to NULL
You are trying to make a column with a DEFAULT ON NULL clause nullable.
If you want to make the column nullable and keep the default, just do
SQL> alter table T modify x default 0;
Table altered.
Hope this helps.