case when 语句
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:数学作业 时间:2024/08/08 02:03:41
case when 语句
merchantCode 有三个值分别是globalMerchant,mc:{ABC=1,OUPAY=LX0000000},12345678
我现在要写一段语句,当merchantCode =globalMerchant时,需要执行的是merchantCode is null,等于其他的时,执行相对应的值
(case m.merchantCode when 'globalMerchant' then is null else m.merchantCode end)=?
表示传过来的参数,有什么语句可以写出我要表达的意思
merchantCode 有三个值分别是globalMerchant,mc:{ABC=1,OUPAY=LX0000000},12345678
我现在要写一段语句,当merchantCode =globalMerchant时,需要执行的是merchantCode is null,等于其他的时,执行相对应的值
(case m.merchantCode when 'globalMerchant' then is null else m.merchantCode end)=?
表示传过来的参数,有什么语句可以写出我要表达的意思
![case when 语句](/uploads/image/z/3822221-29-1.jpg?t=case+when+%E8%AF%AD%E5%8F%A5)
select case m.merchantCode when 'globalMerchant' then null else m.merchantCode end
from m
-- then 后面不用 is
from m
-- then 后面不用 is