mysql which is not in SELECT list; this is incompatible with DISTINCT解决方案
mysql报错Expression #1 of ORDER BY clause is not in SELECT list, references column ‘xxx’ which is not in SELECT list;与 order by 在一起用时则会报3065错误。因为mysql5.7的语法比 mysql5.6 的语法更严格,将DISTINCT 与 order by 一起用时这两个都会进行排序处理。长期解决方案:/etc/my.cnf增加如下配置。这是在 mysql5.7 版本,
原创
2023-11-30 09:36:27 ·
1006 阅读 ·
0 评论