Manu, From Teruel (Spain):cool:
Hi everyone!
I'm trying to build a BD with 3 relational tables, something like: C = A + B.
The A and B tables are InnoDB and they're OK, my problem comes with the last one (C)
I can't use FOREIGN KEY. Is it because I'm using MySQL Admin? Is there a limitation on the server? Am I writing something wrong? :dunno:
Thanks for your help. (Excuse me for my poor English)
That's my code:
CREATE TABLE score (
id INT NOT NULL AUTO_INCREMENT,
id_composer INT NOT NULL,
id_work INT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (id_composer) REFERENCES composer (id),
FOREIGN KEY (id_work) REFERENCES work (id)
);
ENGINE = InnoDB;


LinkBack URL
About LinkBacks
Reply With Quote



