码迷,mamicode.com
首页 > 数据库 > 详细

oracle之case

时间:2019-10-31 16:25:02      阅读:55      评论:0      收藏:0      [点我收藏+]

标签:cas   rom   pre   font   div   The   from   col   sele   

使用oracle时,不免会用到判断后转换为要展示的值,这里常用case,如下:

SELECT (case
         when (1 > 2) then
          yes
         when (2 = 2) then
          no
         else
          other
       end) --no
  from dual;

 

oracle之case

标签:cas   rom   pre   font   div   The   from   col   sele   

原文地址:https://www.cnblogs.com/lidelin/p/11771739.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!