-- salary_rowid.sql

DECLARE
  CURSOR emps IS
    SELECT pay_type_code, pay_amount, rowid
      FROM employee
     WHERE pay_type_code = 'S';
  min_pay employee.pay_amount%TYPE;
BEGIN
   SELECT MIN(pay_amount)
     INTO min_pay
     FROM employee
    WHERE pay_type_code = 'S';
  FOR emp IN emps
  LOOP
    IF emp.pay_amount = min_pay THEN
      UPDATE employee
         SET pay_amount = pay_amount * 1.2
       WHERE rowid = emp.rowid;
    END IF;
    COMMIT;
  END LOOP;
END;
/
