首页 > 其他 > 详细

decode&case

时间:2017-11-09 23:22:18      阅读:212      评论:0      收藏:0      [点我收藏+]

select id, decode (type,1,a,2,b,3,c,999) from xxx;

select name, (case when score<0 then ‘d‘

when score <60 then ‘d‘

when score<=60  then  ‘c‘

else ‘b‘ end  )from xxx;

 

decode&case

原文:http://www.cnblogs.com/abcyrf/p/7811878.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!