Case when then, but with AND condition inside when and before then

后端 未结 3 2091
天命终不由人
天命终不由人 2021-02-13 12:25

In the below query I want to add an AND condition inside the CASE\'s WHEN and before THEN is that possible?

for example WHEN \'r\' AND table1.name=\"jones\" THEN \'very

3条回答
  •  你的背包
    2021-02-13 13:08

    Switch from case when then ... to case when then ...:

    CASE 
    WHEN table1.event = 'r' AND table1.active = 1 THEN 'very high'
    ...
    

提交回复
热议问题