PROCEDURE P_CURS_BONUS IS v_bonus number(30,2); rec_bonus xl_emp_bonus%ROWTYPE; CURSOR curs_bonus IS SELECT * FROM xl_emp_bonus FOR UPDATE OF bonus; BEGIN OPEN curs_bonus; LOOP FETCH curs_bonus INTO rec_bonus; exit when curs_bonus%NOTFOUND; v_bonus := 0.20; IF rec_bonus.salary > 5000 THEN v_bonus := 0.05; END IF; UPDATE xl_emp_bonus SET bonus = rec_bonus.salary * v_bonus WHERE CURRENT OF curs_bonus; END LOOP; CLOSE curs_bonus; END;