1

When I executed a SQL statement in MySQL workbench I got error message Error Code: 1215. Cannot add foreign key constraint. It only told me the result, but didn't tell me the reason. Is there any way to show more detailed error message? enter image description here

AlpacaMan
  • 465
  • 2
  • 7
  • 24
  • I think it's about the way mysql is designed, this is what the best it can tell you about the error! Then you can come to SO and ask a proper question giving a [minimal, complete and verifiable example](https://stackoverflow.com/help/mcve) that reproduces your problem. – Udayraj Deshmukh Mar 12 '18 at 03:22
  • MySQL isn't very good at telling the specific reason for a failed foreign key constraint, but I recommend you follow the checklist in the answer here: https://stackoverflow.com/a/4673775/20860 – Bill Karwin Mar 12 '18 at 03:41

0 Answers0