mysql SELECT IF statement with OR

后端 未结 2 1196
一生所求
一生所求 2020-12-10 00:39

The following works - returns Y when chargeback equal to 1 else it defaults to N

IF(fd.charge_back = 1, \'Y\', \'N\') AS charge_back

howeve

2条回答
  •  长情又很酷
    2020-12-10 01:09

    Presumably this would work:

    IF(compliment = 'set' OR compliment = 'Y' OR compliment = 1, 'Y', 'N') AS customer_compliment
    

提交回复
热议问题