I have table A (innoDB) and table B (MyISAM). When I add foreign keys from A to B. It reports:
ERROR 1005: Can't create table (errno: 150)
Why is it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MyISAM does not support foreign key constraint.
Both table needs to be InnoDB.
Change engine to InnoDB first.