5. Embedded OpenSQL : Data Manipulation with Cursors : Fetching Rows Inserted by Other Queries
 
Share this page                  
Fetching Rows Inserted by Other Queries
While a cursor is open, the application can append rows using non‑cursor insert statements. If rows are inserted after the current cursor position, the rows may or may not be visible to the cursor, depending on the following criteria:
Updatable cursors—The newly inserted rows are visible to the cursor. Updatable cursors reference a single base table or updatable view.
Non‑updatable cursors—If the cursor SELECT statement retrieves rows directly from the base table, the newly inserted rows are visible to the cursor. If the SELECT statement manipulates the retrieved rows (for example, includes an ORDER BY clause), the cursor retrieves rows from an intermediate buffer, and cannot detect the newly inserted rows.