In ANSI mode, you can define a cursor for the query results and for every row in the query results to update or delete the data row using the cursor associated with the row.
Therefore, instead of identifying a search condition, update and delete operations identify a cursor (or a pointer) to a specific row to be updated or deleted.
You can use pocketable cursors to update each row of a select result independently, as processed.
Recommendations
To reap the full benefit from the updatable cursor feature, minimize:
- The size of query result and number of updates/transaction
- The length of time you hold the cursor open
Using multiple updates per cursor may not be optimal because:
- Multiple updates per cursor block other transactions.
- The system requires longer rollbacks.
Use the MultiLoad utility to do updates.