Using Host Arrays
The Client-side programs can use anonymous PL/SQL blocks to bulk-bind input and output host arrays. However, this is the well-organized way to pass the collections to and from the database server.
The Host arrays are declared in a host environment like an OCI or Pro C program and should be prefixed with a colon to differentiate them from PL/SQL collections. In the illustration below, an input host array is used in the DELETE statement. At run time, the anonymous PL/SQL block is sent to the database server for the execution.
-- assume that values were assigned to the host array
-- and host variables in the host environment
FORALL i IN :lower..:upper
DELETE FROM emp WHERE deptno = :depts(i);