FORALL … FORALL i IN UPDATE emp SET sal = sal * 1.10 UPDATE 6..10 FROM (SELECT * FROM @emps WHERE UPDATE emp SET _idx_ between 6 and 10) as t_a sal = sal * INNER JOIN emp 1.10 ON (emp.empno = t_a.empno) WHERE empno = t(i); FORALL … FORALL i IN DELETE FROM emp WHERE empno IN DELETE 6..10 (SELECT empno FROM @t WHERE _idx_ between 6 and 10) DELETE FROM emp WHERE empno = t(i);
FORALL … UPDATE FORALL i IN 6..10 UPDATE emp SET sal = sal * 1.10 WHERE empno = t(i); UPDATE emp SET sal = sal * 1.10 FROM (SELECT * FROM @emps WHERE _idx_ between 6 and 10) as t_a INNER JOIN emp ON (emp.empno = t_a.empno) FORALL … DELETE FORALL i IN 6..10 DELETE FROM emp WHERE empno = t(i); DELETE FROM emp WHERE empno IN (SELECT empno FROM @t WHERE _idx_ between 6 and 10)