In Oracle, the branch statement condition branch statement: www.2cto.com pl/SQL provides three branch statements: if -- then, if --- then -- else, if -- then -- ifesle, you can enter an employee name. If the employee's salary is lower than 2000, the employee's salary will be increased by 10% create or replace procedure chenchuang_pro (namevarchar2) is defined variable v_sal emp. sal % type; begin: select sal into v_sal fron emp where ename = name; Judge if v_sal <2000 then update emp set = sal * 1.1 where ename = name; end if; end; in this process, www.2cto.com ---------------------------------------------------------------- dual-condition branch if -- then -- else writes a process and you can enter an employee name, if the employee's subsidy is not 0, it will increase by 100 based on the original one. If it is 0, it will set the subsidy to 200 create or replace procedure chenchuang1_pro (namevarchar2) is to define the variable v_comm emp. comm % type; begin starts to execute select sal into v_sal fron emp where ename = name; Judge if v_comm <> 0 then update emp set = comm + 100 where ename = name; else update emp set = comm + 200 where ename = name; end if; end; ========================================================== ========================= procedure: this is the keyword emp in the creation process. comm % type: indicates that the type of the variable is the same as the type and size of the comm field in the emp table. <>: in Oracle, the value is not equal