原文:SELECT list is not in GROUP BY clause and contains nonaggregated column 't_user_rel.distance' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=on

錯誤信息 發生錯誤的源sql語句 其中distance 不是group by的字段 ,數據庫做了限制 sql mode only full group by,所以報錯 解決方法 錯誤信息就是sql語句使用group by的時候 獲取字段column 不是分組的字段,mysql配置做了限制: sql mode only full group by 網上查了很多的解決方法就是修改配置文件,就可以解決這 ...

2019-06-11 15:44 0 2615 推薦指數:

查看詳情

SELECT list is not in GROUP BY clause and contains nonaggregated column

報錯如下: 問題出現的原因: MySQL 5.7.5及以上功能依賴檢測功能。如果啟用了ONLY_FULL_GROUP_BY SQL模式(默認情況下),MySQL將拒絕選擇列表,HAVING條件或ORDER BY列表的查詢引用在GROUP BY子句中既未命名的非集合列,也不在功能上 ...

Tue Nov 27 22:16:00 CST 2018 0 19191
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM