MySql插入数据成功但是报[Err] 1055错误的解决方案
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated
sql_mode导致,去除only_full_group_by
解决方法:
– 查看SQL_MODE
SELECT @@sql_mode;
– 修改SQL_MODE
SET sql_mode=(SELECT REPLACE(@@sql_mode,‘ONLY_FULL_GROUP_BY’,‘’));
备注:REPLACE SQL中的替换函数