DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Creating the Not null column

  1. #1
    Join Date
    Nov 2000
    Posts
    34
    Hi,
    I changed the primary key column from Not null to null using the alter statement modify and now i wanted to change it back to the Not null. If I user the same alter statement its not taken the original key system created its own key.

    Please advise me.

    Thanks in advance

    Admala.

  2. #2
    Join Date
    Jan 2001
    Posts
    515

    drop and recreate

    can't you just drop your primary key constraint and create it again?

    alter table
    drop constraint ;

    alter table
    add constraint PK_??? PRIMARY KEY(column_name);

  3. #3
    Join Date
    Nov 2000
    Posts
    34
    lesstjm ,

    Thanks for ur advise but its a development table and there are lot of tables depend on this key. If I drop and recreate is it going to effect the foreign keys.

    Please let me know.

    Admala.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width