MySQL Forums
Forum List  »  Newbie

Change a key from UNI to MUL ?
Posted by: Jon Sheldrake
Date: November 26, 2012 02:55AM

Hi,

I am really struggling with this and would appreciate any help. How do you change a foreign key from UNI to MUL, so that it can accept duplicate values?

Background:
I have a table called 'persons' which has a primary key called 'idUser'. 'idUser' is also a foreign key on a table called 'educational qualifications'.

I want to allow duplicate entries for 'idUser' in the 'educational qualifications table', because a person can have more than one educational qualification.

At the moment, mySQL is not letting me add rows to the 'educational qualifications' with a duplicate entry for persons_idUser. I think this is because the key is set to UNI, not MUL, but I don't know how to change it to MUL.

I would really appreciate any help with this!
Thank you
Jon

Options: ReplyQuote


Subject
Written By
Posted
Change a key from UNI to MUL ?
November 26, 2012 02:55AM


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.