Alter a populated table to add a not null field. [message #35993] |
Mon, 29 October 2001 07:32 |
Poonamb
Messages: 16 Registered: October 2001
|
Junior Member |
|
|
Hello,
This is actually an SQL question but that message board is giving errors!
I need to alter a table that already has data to include an additional not null field.
I decided to first add the field to the table as not null
ALTER TABLE CONCEPT
ADD (CONCEPT_SUMM VARCHAR2(300));
Then populate the field with desired value and then
add contraint to make it not null.
ALTER TABLE CONCEPT
add constraint NL_CONCEPT_C_SUMM
check ("CONCEPT_SUMM" IS NOT NULL);
This works! Except that when I describe the table after both steps, I see the new field and the new constraint. However, next to the field, it does not show not null. WHY ????
Thanks in advance,
Poonam
----------------------------------------------------------------------
|
|
|
|