MySQL Forums
Forum List  »  Newbie

Re: add primary keys to a table one-time and there are already
Posted by: Shantanu Oak
Date: August 07, 2005 05:25AM

You will first have to drop the primary key and then recreate a new one.

alter table debit_slot_detail DROP PRIMARY KEY, add primary key (sp_id, so_id);
alter table debit_slot_detail DROP PRIMARY KEY, add primary key (dn_slot_id, dn_mm_id, sp_id, so_id);

Shantanu Oak

Options: ReplyQuote


Subject
Written By
Posted
Re: add primary keys to a table one-time and there are already
August 07, 2005 05:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.