1293 - Incorrect table definition; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP
2017-12-31 18:02
555 查看
一个表中出现多个timestamp并设置其中一个为current_timestamp的时候经常会遇到
1293 - Incorrect table definition; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATEclause
原因是当你给一个timestamp设置为on updatecurrent_timestamp的时候,其他的timestamp字段需要显式设定default值
但是如果你有两个timestamp字段,但是只把第一个设定为current_timestamp而第二个没有设定默认值,mysql也能成功建表,但是反过来就不行…
N.B:红色的解释是网上的,实际上on updatecurrent_timestamp(在navicat中文版中为“刷新当前时间戳计时”选项)只能设置一个,或者不设置都可以,不能同时设置2个及以上。
1293 - Incorrect table definition; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATEclause
原因是当你给一个timestamp设置为on updatecurrent_timestamp的时候,其他的timestamp字段需要显式设定default值
但是如果你有两个timestamp字段,但是只把第一个设定为current_timestamp而第二个没有设定默认值,mysql也能成功建表,但是反过来就不行…
N.B:红色的解释是网上的,实际上on updatecurrent_timestamp(在navicat中文版中为“刷新当前时间戳计时”选项)只能设置一个,或者不设置都可以,不能同时设置2个及以上。
相关文章推荐
- msyql同步的时候报错 : 错误代码: 1293 Incorrect table definition;there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- Mysql 1293 - Incorrect table definition; there can be only one TIMESTAMP column with C
- Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAUL
- error : Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in
- [Err] 1293 - there can be only one TIMESTAMP column with CURRENT_TIME in DEFAULT or ON UPDATE clause
- mysql单表多timestamp报错#1293 - Incorrect table definition; there can be only one TIMESTAMP column with C
- MySql创建表时插入自动更新时间戳报错:SQL执行错误#1293:Incorrect table definition;there can be only one TIMESTAMP ...
- 创建主键时报错:ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it mus
- ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be def
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be def
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- [Err] 1075 - Incorrect table definition; there can be only one auto column and it must be defined as
- 1075 - Incorrect table definition;there can be only one auto column and it must be defined as a key
- there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be def
- MySQL错误:Incorrect table definition;there can be only one auto column and it must be defined as a key
- 数据库建表 there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
- 解决,Incorrect table definition; there can be only one auto column and it must be defined as a key
- mysql报ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must