老师你好,我这边出现一个很奇怪的问题,在做ProductSellDailyDao中insert方法测试的时候,一直会报一个错误:### Error updating database. Cause: java.sql.SQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘o2o.tb_user_product_map.shop_id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by;后来我各种谷歌百度,成功disable only_full_group_by,但是又出现另外一个问题:Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘%m-%d’)= date_sub(curdate(),interval 1 day) GROUP BY product_id)’ at line 8,难道这个sql语句不适合我的sql版本?我的是mysql 8,谢谢老师
SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需
了解课程