下面一个简单的创建语句报错, sql error 1005 errno:-1,
查了一下说明文档,没有发现,lumn name that matched the name of an internal InnoDB table
1005 (ER_CANT_CREATE_TABLE)
Cannot create table. If the error message refers to error 150, table creation failed because a foreign key constraint was not correctly formed. If the error message refers to error –1, table creation probably failed because the table includes a column name that matched the name of an internal InnoDB table.CREATE TABLE tt(
Id int primary key,
nLevel INT
)
查了一下说明文档,没有发现,lumn name that matched the name of an internal InnoDB table
1005 (ER_CANT_CREATE_TABLE)
Cannot create table. If the error message refers to error 150, table creation failed because a foreign key constraint was not correctly formed. If the error message refers to error –1, table creation probably failed because the table includes a column name that matched the name of an internal InnoDB table.CREATE TABLE tt(
Id int primary key,
nLevel INT
)
解决方案 »
- 怎么把一个字段拆分为三个字段,然后对表中的另外三个字段赋值,进行修改?
- 多列索引中的一列自增 在mysql 5.5.17执行不了
- sql查询语句求优化
- 问个mysql菜鸟问题
- mysql中备份恢复问题
- 给个hql
- Mysql 的REPLACE INTO用法问题
- 创建触发器后不能进行修改操作,Can't update table 'psxt_user' in stored function/trigger because
- mysql中查询也会开启事务吗?
- 新手求指引
- **********************mysql 远程 增量备份(windows 和linux) 求思路**********************
- 数据库字段显示宽度与实际存储宽度
-> Id int primary key,
-> nLevel INT
-> );
Query OK, 0 rows affected (0.02 sec)
SELECT * FROM information_schema.KEY_COLUMN_USAGE where table_schema='库名' and constraint_name like '%主键名%';
出现的原因可能是,先创建了从表,之后再创建的子表。