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;
时间: 2024-12-19 10:02:17
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;