MySQL Forums
Forum List  »  Spanish

Re: ayuda en la siguiente bbdd porfavor !
Posted by: Marco Rios
Date: May 25, 2017 06:34PM

Andrei,
me parece que el error está en que estás tratando de hacer UNA SOLA LLAVE FORÁNEA, que se referencía a mas de una tabla, lo cuál hasta dónde yo sé, no es posible.
Tendrías que hacer crear UNA LLAVE FORÁNEA POR TABLA referenciada

CREATE TABLE...
...
foreign key (codC)
references conductores (codC)
on delete cascade on update cascade,
foreign key (codM)
references maquinas (codM)
on delete cascade on update cascade, 
foreign key (codP)
references proyectos (codP) 
on delete cascade on update cascade
...

o algo similar

Thanks in advance for your valuable help.

Acer Aspire 2920
CPU: Intel Core 2 Duo T7300@2.00GHzX2
RAM: 4GB
Graphics: Intel 965GM
OS: UBUNTU 16.04 LTS 64bits
--
Best regards
Marco
Mexico City, Mexico

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: ayuda en la siguiente bbdd porfavor !
95
May 25, 2017 06:34PM


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.