select &enter,
case
when enter=mon then '1'
when enter=yr then '12'
else '0'
end as status
from dual
最佳答案
基于原始代码:
select '&enter',
case
when '&enter'='mon' then '1'
when '&enter'='yr' then '12'
else '0'
end as status
from dual
建议代码:
select '&enter',
case '&enter'
when 'mon' then 1
when 'yr' then 12
else 0
end as status
from dual
关于mysql - 当我输入 non 时,它需要显示 1 和 12 年,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40903088/