When is a cursor used in oracle




















A cursor is a pointer that points to a result of a query. An explicit cursor is an SELECT statement declared explicitly in the declaration section of the current block or a package specification. Oracle defines an execution cycle that executes an SQL statement and associates a cursor with it. Before using an explicit cursor, you must declare it in the declaration section of a block or package as follows:.

Before start fetching rows from the cursor, you must open it. To open a cursor, you use the following syntax:.

Change Language. Related Articles. Table of Contents. Save Article. Improve Article. Like Article. Recommended Articles. Article Contributed By :. This private SQL area is called context area or cursor. These cursors take up space in the shared pool, which is essential memory component of Oracle Database, specifically in the library cache.

Sometimes, the number of cursors in the database exceeds the maximum limit, and as a result, the following error is thrown:.



0コメント

  • 1000 / 1000