sql语句之case when null 解决方法

时间:2020-02-01 12:27:33   收藏:0   阅读:62

//判断空值,成功!!

   select case  
          when 项目名称  IS NULL  
          then '空值'  
          when 项目名称 ='北二环'  
          then 'A'  
          when 项目名称 ='北三环'  
          then 'B'  
          else 'C'  
          END  项目名称  
   from   物件设计数量统计表
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!