数据库:sql server 2005
表名:test_liu
表结构:test_liu(id(int),name(varchar),category(varchar))
表中的数据:见附件图片
有没有知道,下面这条sql是什么意思?结果到底是按照什么排序的?
select * from test_liu order by case test_liu.category when 'fruit' then 'vegetable' else 'fruit' end;
哪位能给指点指点,先谢过了!