2010-10-20 57 views

回答

4
ORDER BY CASE WHEN name = 'developer' THEN '0' ELSE name END 
1

像這樣的東西可能適合你。

SELECT * FROM table ORDER BY CASE WHEN name = 'developer' THEN 0 ELSE 1 END, name 
2

你也可以做的ORDER BY沒有CASE的用法:

ORDER BY 
    name = 'developer' DESC, 
    name ASC; 
+0

這也避免了有關的性質言外之意的'name's是公認的答案忘了注意。 – 2016-06-05 21:44:24