1.问题
执行SQL时报如下错误:
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
2.分析
根据报错信息可知道,这是因为Mysql的sql_mode不匹配导致,去除"only_full_group_by"模式即可。
3.解决方案
方案1:仅修改当前数据库的SQL_MODE
-- 查看SQL_MODE
SELECT @@sql_mode;
-- 修改SQL_MODE
SET