关于Mysql的[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause 问题

    在今天导入数据库的时候出现了一个错误:

[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

 然后百度了一下,特别多的解决方案,其中一个是:

select version(),

@@sql_mode;SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

 我直接把这两行命令复制到了脚本的最后运行,结果只跳出来

 

 

 应该是先执行这两行命令,在执行脚本,成功!

你可能感兴趣的:(随笔)