Message from: jenasatyabrata82_718
Sir,i have another question. Is this a bug in oracle or what,i don’t understand.
When i tried to alter a primary key column in a table,to NULL , first time
sqlplus shows the message ,“Table altered” but subsequently ,i got error,
ORA-01451: column to be modified to NULL cannot be modified to NULL My question
is that , i should get a consistent message every time. Not different message at
different time.So is this a bug in oracle? I have gone through steps like this.
–>Suppose in a Employee table,EMP_ID column is primary key -->I tried to alter
EMP_ID column to accept NULL values, but it generates error ALTER TABLE EMPLOYEE
MODIFY (EMP_ID NULL); ORA-01451: column to be modified to NULL cannot be
modified to NULL -->So i tried ,to alter EMP_ID column to NOT NULL, and i got
message ,Table altered. ALTER TABLE EMPLOYEE MODIFY (EMP_ID NOT NULL); -->Then i
tried to alter EMP_ID column to accept NULL values, but THIS TIME IT DOES NOT
GENERATES ANY ERROR, and i got message ,Table altered. ALTER TABLE EMPLOYEE
MODIFY (EMP_ID NULL); But when again ,i run the same statement again,it
generates error ORA-01451: column to be modified to NULL cannot be modified to
NULL
Historical Messages
Author: jenasatyabrata82_718
Date: Thu Jul 15 19:02:38 PDT 2010
Sir,i have another question. Is this a bug in oracle or what,i don’t understand.
When i tried to alter a primary key column in a table,to NULL , first time
sqlplus shows the message ,“Table altered” but subsequently ,i got error,
ORA-01451: column to be modified to NULL cannot be modified to NULL My question
is that , i should get a consistent message every time. Not different message at
different time.So is this a bug in oracle? I have gone through steps like this.
–>Suppose in a Employee table,EMP_ID column is primary key -->I tried to alter
EMP_ID column to accept NULL values, but it generates error ALTER TABLE EMPLOYEE
MODIFY (EMP_ID NULL); ORA-01451: column to be modified to NULL cannot be
modified to NULL -->So i tried ,to alter EMP_ID column to NOT NULL, and i got
message ,Table altered. ALTER TABLE EMPLOYEE MODIFY (EMP_ID NOT NULL); -->Then i
tried to alter EMP_ID column to accept NULL values, but THIS TIME IT DOES NOT
GENERATES ANY ERROR, and i got message ,Table altered. ALTER TABLE EMPLOYEE
MODIFY (EMP_ID NULL); But when again ,i run the same statement again,it
generates error ORA-01451: column to be modified to NULL cannot be modified to
NULL
__