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
if 'Other' is not present in Table USE
(SELECT name FROM categories ORDER BY name)
UNION
(SELECT "Other")
精彩评论