在mysql中,分组和排序同时使用时,需要注意配置中的sql_mode是否有only_full_group,如果运行在这个模式下,order by语句中的字段,必须出现在group by中,否则会提示错误
Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nona
在mysql中,分组和排序同时使用时,需要注意配置中的sql_mode是否有only_full_group,如果运行在这个模式下,order by语句中的字段,必须出现在group by中,否则会提示错误
Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nona