原文:mysql 5.7*, 報錯:this is incompatible with DISTINCT

剛布署了的mysql查詢報錯: this is incompatible with DISTINCT 解決方法: 在mysql 配置文件my.ini 或者my.cnf 里添加: ...

2020-12-23 21:23 0 416 推薦指數:

查看詳情

MySql5.7 Distinct與Order By同時使用報錯的解決方案

mysql5.7版本中,如果DISTINCT和order by一起使用將會報3065錯誤,sql語句無法執行。這是由於5.7版本語法比之前版本語法要求更加嚴格導致的。 解決方案: 1、vim /etc/my.cnf 2、如果沒有sql_mode配置,則添加 sql_mode ...

Mon Sep 17 09:32:00 CST 2018 0 1406
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM