MySQL-除一个条目外,按字母顺序排序? [英] MySQL - ordering alphabetically except for one entry?

查看:105
本文介绍了MySQL-除一个条目外,按字母顺序排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用MySQL来对类别列表进行排序,因为我使用的是仅允许这样做的CMS.有没有一种方法可以按字母顺序排序,但可以返回列表末尾的一个条目(其他")?

I have to sort a list of categories using MySQL as I am using a CMS that only allows this. Is there a way to sort alphabetically but to return one entry ("Other") at the end of the list?

推荐答案

ORDER BY ColumnName = 'Other', ColumnName

这篇关于MySQL-除一个条目外,按字母顺序排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆