Hi
I have just started learning oracle.
i have created a table with name imp_master and columns item_code with constraint not null, item_name with constraint n1 not null(n1 is user defined constraint name), item_rate and item_desc.
the copmmand is as follows...
CODE:
create table item_master
( item_code varchar2(25) not null,
item_name varchar2(25) n1 not null,
item_rate number(7,2),
item_desc varchar2(50) );
table has been created with the above mentioned columns. i have checked it with the command " desc item_master;"
After this has been done i have altered the column "item_desc" with the command " alter table item_master modify item_desc not null; "
the column has been altered.
To check this i have entered the command
Insert into table item_master (item_desc) values (null);
The problem is here
instead of showing the message that the column item_desc does not take null values... it is throwing error message
ERROR MESSAGE :
ORA_01400 cannot insert null into
( "SCOTT"."ITEM_MASTER"."ITEM_CODE")
even though i am trying to enter nulls into "item_desc" column ... it is referring to "item_code" column.
After this i have modified the item_desc to accept the null values. And then i ran command to enter the values into the column. Then also it is throwing the error message as
ERROR MESSAGE:
ORA_01400 cannot insert null into
( "SCOTT"."ITEM_MASTER"."ITEM_CODE")
I am programming in oracle 9. OS is windows 200 advanced server.
Help appreciated.