Results 1 to 4 of 4

Thread: Oracle Null and Unique value

  1. #1

    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?


  2. #2
    Junior Member
    Join Date
    May 2007
    Answers
    16

    Re: Oracle Null and Unique value

    Did u verify before Altering the table taht there are no records in table with NULL RollNumbers?


  3. #3
    Junior Member
    Join Date
    Apr 2007
    Answers
    11

    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


  4. #4
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact