特牛网址导航

【SQL中case then的用法】_case then用法_J.Kuchiki的博客-CSDN博客

网友收藏
文章浏览阅读6.8k次。SQL中case then的用法  当我们需要从数据源上直接判断数据显示代表的含义的时候 ,就可以在SQL语句中使用CASE THEN这个函数了。  其中case then有两种格式:1.第一种格式:case 列名when 条件值1 then 选项1when 条件值2 then 选项2.......else 默认值 end1.第二种格式:case when 列名=条件值1 then 选项1when 列名=条件值2 then 选项2.......else 默认值 end话不多说_case then用法
标签:case then用法