You can specify these options for a cursor declaration.
- cursor_name
- Name of the cursor.
- SCROLL
- SCROLL allows the cursor to scroll forward to the next row or back to the first row of the response set.
- NO SCROLL
- When NO SCROLL is specified or when no option is specified, the cursor can only scroll forward to the next row. NO SCROLL is the default.
- CURSOR
- Keyword qualifying the cursor_name as the cursor for the statement set to follow.
- WITHOUT RETURN
- Specifies that the procedure does not return a result set.
- WITH RETURN ONLY
- A result set cursor that is returned by the procedure, but that cursor cannot be fetched.
- TO CALLER
- The result set from the target procedure is to be returned to either of the following:
- TO CLIENT
- The result set is to be returned to the client application even if called from a nested procedure.
- FOR READ ONLY
- The default option and is implicit.
- FOR UPDATE
- Makes the cursor updatable. Update or delete operations can be performed on the cursor.
- PREPARE
- An SQL_statement_name is to be set up to be executed dynamically.
- SQL_string
- The SQL text that is to be executed dynamically.
- SQL_string_variable
- Name of an SQL local variable that contains the SQL text string that is to be executed dynamically.