mysql使用DISTINCT函數,報錯ERROR 1140 (42000): In aggregated query without GROUP BY.....

現象: 執行sql SELECT COUNT(DISTINCT ( colum1 )),colum2, colum3  FROM table;報錯ERROR 1140 (42000): In aggregated query without GROUP BY..... 原因: mysql的sql_mode默認開啓了only_full_group_by模式,導致mysql的sql的group by
相關文章
相關標籤/搜索