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

执行sql转储文件时报以下错:
[Err] [Dtf] 1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

在这里插入图片描述
MySql 5.5和MySql 5.6之后版本的区别:5.5 只能有一个Timestamp,将其中一列类型改为datetime类型就可以解决。
只要把
'update_time' timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
修改成
update_time' datetime datetime NOT NULL COMMENT修改时间,

即可。

发布了81 篇原创文章 · 获赞 18 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_43542074/article/details/103268922