DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2001


    i have an existing primary key constraint, how can i add another column in this constraint(there are two existing column on this constraint)? do i need to drop this one and create another one ? how about the index referred to this contraint what will happen if i delete it ? i tried to delete it using dba studio but there's no option for it.

    thanks in advance.

  2. #2
    Join Date
    Feb 2001
    Baltimore,MD USA
    I don't Know about that u can add column to primary key constraint.
    But one solution may be
    desable primary key constraint
    create another PK index including all columuns that u want.
    and drop previous disable Pk constraint

    try it out


  3. #3
    Join Date
    Nov 2000
    alter table tblname drop constraint pkname;
    alter table tblname add constraint pkname primary key(col1,col2);

    the old primary index will be deleted and a new index will created

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