MySQL Forums
Forum List  »  InnoDB

reference a table with another FOREING KEY
Posted by: Hermidio Rodriguez Chavez
Date: April 16, 2008 07:43AM

Friend's have the following scenario

3 tables

students, state, provincia

all student must be assigned to one state and one provincia, the tables state and provincia are linked with FOREIGN KEY , here's the scenario:;

table state

id_state
state

Table provincia

id_provincia
provincia
fk_state

fk_state reference to the id_state in the state table with one FOREIGN KEY, but now i need add another FOREIGN KEY in the student table referencing id_provincia in the table provincia, i try do that but i've receiving a error message.

Thanks in advance

Hermidio

Options: ReplyQuote


Subject
Views
Written By
Posted
reference a table with another FOREING KEY
8266
April 16, 2008 07:43AM


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.