MySQL_插入数据异常[Err] 1055 - Expression #1的解决

[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

但是数据还是可以插入,这个异常是什么意思?涉及到的只是一个简单的insert语句没有关于order by 的语句

解决方法:
在my.ini 里面加上

sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

大概是在sql_mode 中去掉only_full_group_by

然后重启mysql


visitor tracker
访客追踪插件


你可能感兴趣的:(学习笔记,MySQL)