Usage restrictions v16

The following are restrictions on cursor variable usage:

  • You can't use comparison operators to test cursor variables for equality, inequality, null, or not null.
  • You can't assign null to a cursor variable.
  • You can't store the value of a cursor variable in a database column.
  • Static cursors and cursor variables aren't interchangeable. For example, you can't use a static cursor in an OPEN FOR statement.

The table shows the permitted parameter modes for a cursor variable used as a procedure or function parameter. This use depends on the operations on the cursor variable in the procedure or function.


For example, if a procedure performs all three operationsOPEN FOR, FETCH, and CLOSEon a cursor variable declared as the procedure’s formal parameter, then that parameter must be declared with IN OUT mode.