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.
03-07-2001, 07:31 AM
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
03-07-2001, 10:17 AM
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