MYSQL错误1005(HY000): Can't create table (errno: 121 "Duplicate key on write or update")

标签 mysql database xampp

我正在 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! 12

最佳答案

我认为,大多数情况下,您错过了像这样的约束名称 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/

相关文章:

mysql - 外键引用复合主键

mysql - 不同用户在同一张表上进行多个联接

database - SQL Server 字段被截断

php - 找不到 php_sqlsrv 扩展 - 5.3,线程安全

MySQL,为什么这个简单的 'CREATE TABLE' 查询失败?

mysql - 如何将多个mysql表合并为一个?

mysql - mysql 查询语法有问题?试图从 INNER JOIN 中插入

php - 在 XAMPP (OS X/El Capitan) 上安装 MongoDB 驱动程序时出错

MySQL意外关闭;

mysql - 数据库内存和磁盘工作分配