SQL state [HY000]; error code [3065]异常解决方法
274 ·
0 ·
2021-03-09 15:07
最新一次编辑的原因:

mysql版本

5.7

 

异常信息:

Cause: java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'xxx' which is not in SELECT list; this is incompatible with DISTINCT
; uncategorized SQLException; SQL state [HY000]; error code [3065]; Expression #1 of ORDER BY clause is not in SELECT list, references column 'xxxx' which is not in SELECT list; this is incompatible with DISTINCT; nested exception is java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'xxx' which is not in SELECT list; this is incompatible with DISTINCT

解决方法:

在mysql的配置文件中加入以下配置即可

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES


本作品系原创,采用《署名-非商业性使用-禁止演绎4.0 国际》许可协议.转载请说明出处
本文链接:https://www.upupor.com/u/21030915036343077888 复制分享

无评论内容,快来评论吧

推荐阅读
1169 2020-03-05 20:03 · 最后回复: upupor · 2020-03-16 09:22
325 2020-08-24 11:52 · 最后回复: upupor · 2020-08-24 11:53
181 2020-11-10 14:13 · 最后回复: 薄荷加点糖 · 2020-11-12 13:40
259 2020-11-27 14:16 · 最后回复: 薄荷加点糖 · 2020-12-01 14:45
106 2021-02-15 23:46
109 2021-02-20 00:22