一尘不染

mysql SELECT IF语句或

mysql

以下工作-拒付金额等于1时返回Y,否则默认为N

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

但是我似乎无法使这一工作正常?语法有效吗

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

阅读 1694

收藏
2020-05-17

共1个答案

一尘不染

大概这可以工作:

IF(compliment = 'set' OR compliment = 'Y' OR compliment = 1, 'Y', 'N') AS customer_compliment
2020-05-17