首页 > 数据库 >在mysql中分组和排序同时使用

在mysql中分组和排序同时使用

时间:2023-03-23 11:45:15浏览次数:42  
标签:group clause mysql 分组 使用 排序

在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

  

标签:group,clause,mysql,分组,使用,排序
From: https://www.cnblogs.com/dlmg/p/17246878.html

相关文章