Details
-
New Feature
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
Description
FOR ALL / BULK COLLECT is commonly used by the PL/SQL developers for quickly processing a large amount of data for SELECT, UPDATES, INSERTS, DELETE, etc.
Oracle Doc: https://docs.oracle.com/database/121/LNPLS/forall_statement.htm#LNPLS01321
BULK COLLECT is used in plain SELECT and cursor FETCH. See Oracle docs:
https://docs.oracle.com/database/121/LNPLS/tuning.htm#GUID-19F50644-C88E-49AF-B31C-3EE4B4432714
We should support this in general, not only with the Oracle Mode
Note that for doing this, we need array or list support.
Example queries:
DROP TABLE employees_temp;
CREATE TABLE employees_temp AS SELECT * FROM employees;
DECLARE
TYPE NumList IS VARRAY(20) OF NUMBER;
depts NumList := NumList(10, 30, 70); – department numbers
BEGIN
FORALL i IN depts.FIRST..depts.LAST
DELETE FROM employees_temp
WHERE department_id = depts
;
END;
Attachments
Issue Links
- is blocked by
-
MDEV-6121 Add support for arrays in tables
-
- Open
-
-
MDEV-34319 Associative arrays: DECLARE TYPE .. TABLE OF .. INDEX BY in stored routines
-
- Closed
-
- is part of
-
MDEV-41086 Support for Oracle numlist and vararray
-
- Open
-