MySQL Forums
Forum List  »  Newbie

Foreign key error "cannot create table...(errno: 150)"
Posted by: Thomas Mahoney
Date: August 27, 2018 10:03AM

I have created a Movies database to house all of my dvd titles for insurance purposes. I have create two tables:

Movies, with the fields: Title, Genre, Company, and Actors, with Title as the primary key field.

Actors, with the fields: Name, and MovieTitle, with Name as the primary key field.

Now when I try to link the two tables' Name and Actor fields using the foreign key field Name in the table Actors, I get the error:

Can't create table 'MOVIES.#sql-226c-31' (errno: 150)

What am I doing wrong?

Options: ReplyQuote


Subject
Written By
Posted
Foreign key error "cannot create table...(errno: 150)"
August 27, 2018 10:03AM


Sorry, only registered users may post in this forum.

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.