SQL Server orderby with some fixed values

I came across a problem when we want to set the default language to English in a dropdown list. Such as:

Chinese
Danish
English
German
Japanese
Swedish

We want the English come to the first, and the rest follows That’s:

English    //go to first
Chinese
Danish
German
Japanese
Swedish

 

We can do this by uniting the two SQL result sets:

select * from country where lang='English'
union
select * from country where lang<>'English'
posted @ 2012-03-09 11:15  Jerry Chou  阅读(134)  评论(0编辑  收藏  举报