您的位置:首页 > 其它

orderby与groupby同时使用

2018-01-31 10:47 141 查看
两个同时使用:要求排序其他字段

select c1,max(c2) as a from table group by c1 order by a;


in查询按照排序结果:

select * from table order by field(c1,1,2,3,4....)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: