解决,Incorrect table definition; there can be only one auto column and it must be defined as a key
今天在迁移项目时,操作数据库报错:
Incorrect table definition; there can be only one auto column and it must be defined as a key
我用的是Navicat Premium,而检测表中其他字段发现,并没有另一个设为自增的字段,很是费解,最后在stackoverflow找到这样的答案:

意思是:设为自增的字段必须是主键,而我用的是客户端,表是批量从SQLServer复制到MySQL的,导致最后MySQL表中主键丢失,设置id为主键并设为自增后,保存成功,问题解决。
解决,Incorrect table definition; there can be only one auto column and it must be defined as a key的更多相关文章
- mysql:[Err] 1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
		删除主键时,出错:[Err] 1075 - Incorrect table definition; there can be only one auto column and it must be d ... 
- ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key
		约束字段为自动增长,被约束的字段必须同时被key约束 没有设置成primary key 时,会报错. 加上primary key 则设置成功. 
- Mysql运行SQL文件  错误Incorrect table definition;there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
		问题描述 想从服务器上DOWN下数据库.操作:先把数据库转存为SQL文件,然后在本地利用navicate运行SQL文件,出现错误信息: Incorrect table definition;there ... 
- msyql同步的时候报错 : 错误代码: 1293 Incorrect table definition;there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
		场景,两个不同服务器上的数据库,进行数据库同步 但是执行之后,提示报错 错误代码: 1293 Incorrect table definition; there can be only one TIM ... 
- Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
		错误描述 在DBeaver执行DDL语句时报错:SQL 错误 [1293] [HY000]: Incorrect table definition; there can be only one TIM ... 
- 1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
		在数据库执行脚本文件时,执行到一半会遇到 这种问题: 出错处:2018-05-14 18:53:38 行号:712454 错误代码: 1293 - Incorrect table definitio ... 
- mysql单表多timestamp报错#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
		一个表中出现多个timestamp并设置其中一个为current_timestamp的时候经常会遇到#1293 - Incorrect table definition; there can be o ... 
- Mysql --- Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
		我使用的5.5的mysql数据库会报这个错, 换成5.7的就可以了 
- 解决mysql Table ‘xxx’ is marked as crashed and should be repaired的问题。
		解决mysql Table 'xxx' is marked as crashed and should be repaired的问题. 某个表在进行数据插入和更新时突然出现Table 'xxx' is ... 
随机推荐
- PLSQL-Developer数据库连接工具使用方法
			PLSQL-Developer数据库连接工具使用方法 该方法适用于本机未安装Oracle客户端的情况下如何让连接到数据库.经过本人亲自测试绝对可以连接.前提是您安装的版本没有问题,如您安装的版本有问题 ... 
- Scala开发环境搭建与资源推荐
			Scala开发环境搭建与资源推荐 本文介绍了Scala的开发环境,包括SDK.IDE的设置.常用资源列表等.Scala是一门静态语言,很有可能就是Java的继承者. AD: 2014WOT全球软件技术 ... 
- leetcode[96] Binary Tree Inorder Traversal
			给定树根root.实现中序遍历,也就是左根右. 用递归的话,很简单,左边的返回值加上root的再加上右边的就行. 我自己写的有点挫: /** * Definition for binary tree ... 
- 【转】Android学习系列–App离线下载功能实现
			原文:http://www.cnblogs.com/qianxudetianxia/archive/2011/07/20/2108965.html 宜未雨而绸缪,毋临渴而掘井.----朱用纯<治 ... 
- JS中的prototype(转载)
			在研究别人写的js图像处理算法时,发现其中脚本中大量使用prototype,很难读明白,就网上查了下资料发现这篇文章很易懂,就转载如下: 1 原型法设计模式 在.Net中可以使用clone()来实现原 ... 
- mac下Android apk 破解流程
			相关工具下载:http://pan.baidu.com/s/1kTkOicn 首先你要有eclipse工具,在sdk目录下有如下工具可以使用 android:adb shell:进入交互shell ... 
- js 将long日期格式 转换为标准日期格式方法
			我们经常在操作的时候会发现从后台传递到view层的json中datetime类型变成了long型,当然你也可以从后台先转为string类型,但是如果是从和数据库对应的object中封装的话,就不能再去 ... 
- C#通过模板导出Word(文字,表格,图片)
			C#通过模板导出Word(文字,表格,图片) C#导出Word,Excel的方法有很多,这次因为公司的业务需求,需要导出内容丰富(文字,表格,图片)的报告,以前的方法不好使,所以寻找新的导出方法, ... 
- iOS基础 - 控件属性
			一.控件的属性 1.CGRect frame 1> 表示控件的位置和尺寸(以父控件的左上角为坐标原点(0, 0)) 2> 修改这个属性,可以调整控件的位置和尺寸 2.CGPoint cen ... 
- c#通用多线程基类,以队列形式
			c#通用多线程基类,以队列形式 个人原创.欢迎转载.转载请注明出处.http://www.cnblogs.com/zetee/p/3487084.html 多线程这个概念大家都很熟悉,对于winfor ... 
