Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL - ordering alphabetically except for one entry?

Tags:

mysql

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?

like image 589
bcoughlan Avatar asked Dec 07 '22 02:12

bcoughlan


1 Answers

ORDER BY ColumnName = 'Other', ColumnName

like image 194
Hammerite Avatar answered Dec 10 '22 13:12

Hammerite