A select cursor that includes a SELECT statement with the
collection-derived table clause allows you to select many elements
from a collection variable.
About this task
To select elements, follow these steps:
Procedure
- Create a client collection variable in your program.
- Declare the select cursor for the collection variable
with the DECLARE statement and open this cursor with the OPEN statement.
- Fetch the element or elements from the collection variable
with the FETCH statement and the INTO clause.
- If necessary, perform any updates or deletes on the fetched
data and save the modified collection variable in the collection
column.
- Close the select cursor with the CLOSE statement, and if
you no longer need the cursor, free it with the FREE statement.