this is incompatible with DISTINCT

矫情吗;* 2022-05-11 07:12 341阅读 0赞

Caused by: Java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘game.giftbag0_.create_date’ which is not in SELECT list; this is incompatible with DISTINCT

服务器Mysql和本地Mysql版本不一样,本地5.7.12 。解决办法可以考虑修改mysql配置文件,找到对应的my.cnf或者my.ini。没有的话就新建一个内容复制my-default.ini中的后面添加如下:

[sql] view plain copy

  1. sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

发表评论

表情:
评论列表 (有 0 条评论,341人围观)

还没有评论,来说两句吧...

相关阅读