tags:

views:

41

answers:

2

I have a table with just as ID and a value. Let's say this list have 4 items, such as Apple,Banana, Zuchinni, and Other. I want to sort the list alphabetically, but always have 'Other' be the last option. Is there a way to accomplish this using a query?

+6  A: 

ORDER BY `column_name` = 'Other', `column_name`

Hammerite
A: 

Sort by IIF(item = 'Other', 1, 0) first, or whatever the mysql equivalent is, then your item column.

lc