decode/case:
select decode('a','1','w','q') from dual;

解决方案 »

  1.   

    to  yannankai(难的我不会) ,9i中这样的语法格式是什么?
      

  2.   

    用法1 :
    declare
        grade char:='A';
    begin
        case grade 
           when 'A' then dbms_output.put_line('Excellent');
           when 'B' then dbms_output.put_line('Very Good');
           else dbms_output.put_line('No such grade');
        end case;
    end;用法2 :
    declare
        grade char:='A';
    begin
        case 
           when grade ='A' then dbms_output.put_line('Excellent');
           when grade ='B' then dbms_output.put_line('Very Good');
           else dbms_output.put_line('No such grade');
        end case;
    end;9i新加的功能,8i并不支持
      

  3.   

    9i有这样的用法,8i没有,可以用decode