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';

原文地址:https://www.cnblogs.com/xianyin/p/6566941.html