CREATE OR REPLACE PROCEDURE upsal(emp_id integer) IS
BEGIN
for rc in (select duty, workplace from emp where empid = emp_id) loop
if rc.duty = "MANAGER" and workplace = "DALLAS" then
update emp set salary = salary * 1.15;
end if;
if rc.duty = "CLERK" and workplace = "NEW YORK" then
update emp set salary = salary * 0.95;
end loop;
END;
CREATE OR REPLACE PROCEDURE upsal(emp_id integer) IS
BEGIN
for rc in (select duty, workplace from emp where empid = emp_id) loop
if rc.duty = "MANAGER" and workplace = "DALLAS" then
update emp set salary = salary * 1.15;
end if;
if rc.duty = "CLERK" and workplace = "NEW YORK" then
update emp set salary = salary * 0.95;
end if;
end loop;
END;