-
Junior Member
Oracle Null and Unique value
Hi Friends,
I have created a table with 2 fields such as name and rollno.
I specified rollno as unique constraint instead of not null constraint.
I have used the following query to change the unique as not null and get the following message.
Alter table student modify(rollno number(5) not null);
Table altered.
But it doesn't accept the not null concept and accepts only the unique concepts.Why? Can you just clarify my doubts?
-
Junior Member
Re: Oracle Null and Unique value
Did u verify before Altering the table taht there are no records in table with NULL RollNumbers?
-
Junior Member
Re: Oracle Null and Unique value
hi subhasini,
for
But it doesn't accept the not null concept
sorry plz check it again it will definitly accept notnull if table alter succesfully.
for
accepts only the unique concepts.Why?
see you have to drop the unique constraint on that column .
by
alter table student drop unique (rollno);
so that it will not accept contraints
hope u will get understand ..
from
sam
-
Re: Oracle Null and Unique value
If the table is altered successfully ,its bound to work.
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