sql case when then else
Posted Danna123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql case when then else相关的知识,希望对你有一定的参考价值。
今天写sql的时候,用了这个条件
我就把这个讲解下吧,初学者可能一开始看不懂
case when s_score is null then 0 else s_score end
意思就是
当s_score值为空的时候就等于0
否则取它本身的值
以上是关于sql case when then else的主要内容,如果未能解决你的问题,请参考以下文章
SQL中的case when then else end用法