[Err] 1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTA

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/guaiguaiknl/article/details/88801618

错误信息:

[Err] 1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

错误描述:

在导入数据库的时候,发现有的数据导入失败

错误原因:

原因是由于mysql版本问题,5.5 和 5.6 在 TIMESTEMP 的行为上有所不同,5.6.5 之前的版本不支持多个CURRENT_TIMESTAMP 默认值。

解决办法:

方法一:升级mysql版本

方法二:如果你有两个timestamp字段,把第一个设定为current_timestamp,而第二个没有设定默认值,MySQL能成功建表,但是反过来就不行

猜你喜欢

转载自blog.csdn.net/guaiguaiknl/article/details/88801618
今日推荐