MySQL Forums
Forum List  »  Newbie

add primary keys to a table one-time and there are already
Posted by: Lucas Tsoi
Date: August 06, 2005 09:48PM

Is it possible to add primary keys to a table one-time and there are already
multiple primary key defined?

I have to change sp_id, so_id as primary keys to the existing primary keys
dn_slot_id and dn_mm_id.

I tried several times but all failed:
1. alter table debit_slot_detail add primary key (sp_id, so_id);
2. alter table debit_slot_detail add primary key (dn_slot_id, dn_mm_id,
sp_id, so_id);

thanks in advance for any help

Options: ReplyQuote


Subject
Written By
Posted
add primary keys to a table one-time and there are already
August 06, 2005 09:48PM


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.