Sql order by 和 group BY一起使用时需要注意

时间:2023-12-24 14:53:13

ORDER BY 子句中的列必须包含在聚合函数或 GROUP BY 子句中。

slect * from table group by class,id order by id

slect * from table group by class,id order by class