出错环境:源:mysql5.6.24
目标:mysql5.5.28-log
错误:Incorrect table definition; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATEclause
原因:一个表中出现多个timestamp并设置其中一个为current_timestamp的时候经常会遇到
在mysql5.528-log中,on updatecurrent_timestamp(在navicat中文版中为“刷新当前时间戳计时”选项)只能设置一个,或者不设置都可以,不能同时设置2个及以上。
在mysql5.6.24中可以同时设置两个。
实际遇到情况:在导入sql失败时,检查sql语句是否存在以上情况,只保留一个on update current_timestamp,删除多于的,保存,重新导入sql ,成功