我正在 XAMPP 中执行 mysql 作业,但一直出现
Error1005(HY000): Can't create table (errno: 121 "Duplicate key on write or update") And when I changed 'Course' to 'Courses' , It worked! Got the same error with 'Instructor', And it worked when I changed the tablename from 'Instructor' to 'Faculty'. See Images below for clarification. I really want to know what's happening under the hood!
最佳答案
我认为,大多数情况下,您错过了像这样的约束名称 CONSTRAINT fk_book_author
。
您还在第一个屏幕的最后一个查询中错过了 TABLE
关键字。
关于MYSQL错误1005(HY000): Can't create table (errno: 121 "Duplicate key on write or update"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35222297/