Oracle 根据单元格内容不同来判断不同条件
select xxx,xxx from xxx where decode(AAA,0,BBB,1,CCC)='12345'
如果AAA字段等于0则AAA=''12345'
否则如果BBB字段等于1则BBB='12345'
否则CCC='12345'
select xxx,xxx from xxx where decode(AAA,0,BBB,1,CCC)='12345'
如果AAA字段等于0则AAA=''12345'
否则如果BBB字段等于1则BBB='12345'
否则CCC='12345'