mysql SELECT IF statement with OR

后端 未结 2 1191
一生所求
一生所求 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 00:58

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

    Will do the job as Buttle Butkus suggested.

提交回复
热议问题