Name
SET CLOSECURSOR
Synopsis
The CLOSECURSOR setting controls whether SQL*Plus closes the cursor used to execute a SQL statement after the statement has executed.
Syntax
SET CLOSECUR[SOR] {OFF | ON}Parameters
- SET CLOSECUR[SOR]
Is the command, which may be abbreviated SET CLOSECUR.
- OFF
Causes SQL*Plus to leave the cursor open for use by subsequent SQL statements. This is the default setting.
- ON
Causes SQL*Plus to close the cursor after a SQL statement has been executed.
While you normally think of a cursor only in the context of returning data from a SELECT statement, Oracle also uses cursors to execute other SQL statements, such as DELETE, INSERT, UPDATE, etc. The same cursor can be used to execute many SQL statements, so SQL*Plus leaves it open all the time by default.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access