代码改变世界

MySQL建表 TIMESTAMP 类型字段问题

2019-04-08 22:30  brookin  阅读(1802)  评论(0编辑  收藏  举报
Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

原因:

mysql 5.6 之前的版本不允许单表出现 2 个 Timestamp 默认值 为 CURRENT_TIMESTAMP 的字段

解决:

mysql5.6 之前的版本是不可以这样设置,升级到 5.6 以上即可。