zoukankan      html  css  js  c++  java
  • mysql5.7关于时间为‘00:00:00’引发的sql错误

    mysql5.7 运行sql语句报错:

      sql语句:

             update card_coupon set SHOW_START_TIME='2017-01-01 00:00:00';
     
      错误信息:
            

          [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

      解决办法:

            查看sql_mode 把 NO_ZERO_IN_DATE,NO_ZERO_DATE 选项去掉

             show global variables like 'sql_mode';

        

    方法:

        set global sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

  • 相关阅读:
    简明python_Day2_字典、集合、模块、类、编程习惯
    测试2T2
    测试2T1
    bzoj2761
    一元三次方程求根公式及韦达定理
    状压DP入门——铺砖块
    高精度模板
    测试1T3
    测试1T2
    测试1T1
  • 原文地址:https://www.cnblogs.com/xianyin/p/6566941.html
Copyright © 2011-2022 走看看