MySQL Forums
Forum List  »  Newbie

Re: foreign key error, Cannot find an index
Posted by: Peter Brawley
Date: November 28, 2019 10:54AM

> alter table coleccion add CONSTRAINT fk_usjuador
> FOREIGN key (usuario_jugador) REFERENCES jugador(usuario);

jugador( usuario varchar(50) ) doesn't match coleccion( usuario_jugador int ); FK types must match exactly.

Options: ReplyQuote


Subject
Written By
Posted
Re: foreign key error, Cannot find an index
November 28, 2019 10:54AM


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.