SQL state [HY000]; error code [3065]异常解决方法
180 ·
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 复制分享

无评论内容,快来评论吧