与 if 语句不同,select case语句在找到匹配的case 表达式并执行了case 表达式和下一个case 表达式之间的语句后.
case when 就是case when 判断 case when...太长了,但是看到一个问题,case when,要求返回的类型必须一直。...(qty,sort)values(1,’a’),(2,’b’),(3,’d’),(1,’e’) .
1.IIf函数 根据表达式的值,来返回两部分中的其中一个。...语法IIf(expr,truepart, . ascolnamefromtable 2....select case A when ’01’ then B when ’02’ then C when ’03’ then D end from t1
如果没有匹配的结果值,则返回结果为ELSE后的结果