zoukankan      html  css  js  c++  java
  • mysql单表多timestamp报错#1293

    mysql单表多timestamp报错#1293 - Incorrect table definition; there can be only one TIMESTAMP column with C解决
     
    一个表中出现多个timestamp并设置其中一个为current_timestamp的时候经常会遇到
    #1293 - Incorrect table definition; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATEclause
      www.2cto.com  
    原因是当你给一个timestamp设置为on updatecurrent_timestamp的时候,其他的timestamp字段需要显式设定default值
     
    但是如果你有两个timestamp字段,但是只把第一个设定为current_timestamp而第二个没有设定默认值,mysql也能成功建表,但是反过来就不行...
      www.2cto.com  
    N.B:上面的解释是网上的,实际上on updatecurrent_timestamp(在navicat中文版中为“刷新当前时间戳计时”选项)只能设置一个,或者不设置都可以,不能同时设置2个及以上。
  • 相关阅读:
    Github地址
    第三次冲刺12.16
    第三次冲刺12.07~12.15
    第二次冲刺11.24~12.03
    第十天
    照片
    最终总结
    app的推广
    第三个Sprint冲刺事后诸葛亮报告
    第三个Sprint团队贡献分
  • 原文地址:https://www.cnblogs.com/yoyo24456/p/3632462.html
Copyright © 2011-2022 走看看