Overview
To process SQL statements, the stored procedure process assigns a memory segment to store context association. Cursors are handles or pointers pointing to context regions. With cursors, stored procedures can control alterations in context regions.
- If JDBC is used to call a stored procedure whose returned value is a cursor, the returned cursor cannot be used.
- When a stored procedure contains COMMIT/ROLLBACK, an explicit cursor caches all data of the cursor to ensure that the cursor is still available after COMMIT/ROLLBACK. If the cursor data volume is large, this process may take a long time.
- After table data is modified in a stored procedure, the cursor related to the table is started, and the data in the fetch cursor continues after rollback. In this case, an error is reported.
Cursors are classified into explicit cursors and implicit cursors. Table 1 shows the usage conditions of explicit and implicit cursors for different SQL statements.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot