Oracle PLSQL Demo - 03.流程判断[IF ELEIF ELSE]

declare

    v_job varchar2(50) := 'Programmer';

    v_sal number;



begin



    if v_job = 'Programmer' then

        v_sal := 6000;

    elsif v_job = 'Senior Programmer' then

        v_sal := 8000;

    else

        v_sal := 10000;

    end if;



    dbms_output.put_line(v_sal);

end;

 

你可能感兴趣的:(if else)