sql语句之case when null 解决方法

Posted 梦乡尘子

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql语句之case when null 解决方法相关的知识,希望对你有一定的参考价值。

//判断空值,成功!!

   select case  
          when 项目名称  IS NULL  
          then '空值'  
          when 项目名称 ='北二环'  
          then 'A'  
          when 项目名称 ='北三环'  
          then 'B'  
          else 'C'  
          END  项目名称  
   from   物件设计数量统计表

以上是关于sql语句之case when null 解决方法的主要内容,如果未能解决你的问题,请参考以下文章