--  raise_mgr_pay2.sql

CREATE OR REPLACE PROCEDURE raise_mgr_pay AS
BEGIN
  FOR s IN 1..7 LOOP
    BEGIN
      UPDATE employee
         SET pay_amount = pay_amount * 1.2
       WHERE id = (SELECT manager_id FROM store 
                    WHERE store_number = s);
    EXCEPTION
      WHEN others THEN
        null;
    END;
  END LOOP;
END;
/
