ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Recipe 2.6. Sorting on a Data Dependent Key

Recipe 2.6. Sorting on a Data Dependent Key

原创 Linux操作系统 作者:wuxidba 时间:2010-12-06 14:27:51 0 删除 编辑
select ename,sal,job,comm
from emp
order by case when job = 'SALESMAN' then comm else sal end
        

3.JPG

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23895263/viewspace-680976/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-05-12

  • 博文量
    64
  • 访问量
    73601