Cursor variables, PL-SQL Programming

What Are Cursor Variables ?

The Cursor variables are like C or Pascal pointers that hold the memory location (address) of some item rather of the item itself. Therefore, declaring a cursor variable creates a pointer, not an item. In the PL/SQL, the pointer has a datatype REF X, where REF is short form for the REFERENCE and X stands for the class of objects. Therefore, a cursor variable has the datatype REF CURSOR.

To execute a multi-row query, the Oracle opens an unnamed work region which stores processing the information. To access the information, you can use an explicit cursor that names the work area. Or, you can use a cursor variable that points to the work region. While the cursor always refers to the similar query work region, a cursor variable can refer to various work regions. Therefore, the cursors and cursor variables are not interoperable.

Posted Date: 10/4/2012 3:57:49 AM | Location : United States







Related Discussions:- Cursor variables, Assignment Help, Ask Question on Cursor variables, Get Answer, Expert's Help, Cursor variables Discussions

Write discussion on Cursor variables
Your posts are moderated
Related Questions
Second Step at defining type SID in SQL CREATE TYPE SID AS VARCHAR(5) ; Explanation: TYPE SID announces that a type named SID is being defined to the system.

Example of EXCEPT Operator - SQL Example, like its counterpart in the theory book, illustrates the convenience of allowing any table expression to be the source for an INSERT

Keyword & Parameter Description: WHEN: This keyword introduces the exception handler. You can have many exceptions execute the similar sequence of the statements by follo

Aggregate Assignment The %ROWTYPE declaration cannot include an initialization clause. Though, there are two ways to assign values to all fields in a record at once. At First, t

RETURN Statement The RETURN statement instantly completes the execution of a subprogram and returns control to the caller. The Execution then resumes with the statement below t

Some Varray Examples In SQL Plus, assume that you define an object type Project, as described below: SQL> CREATE TYPE Project AS OBJECT ( 2 project_no NUMBER(2), 3 title VARCHA

Updating a Variable Assignment of an attribute value in a variable of a structured type Synatx: SET SN.C = 'S2'; As in Example the entire statement is equivalent to a

Parameter & Keyword Description: function_name: The user-defined function is identifying by that keyword. parameter_name: This identifies the formal parameter that

FOR-LOOP While the number of iterations through a WHILE loop is unknown till the loop completes, then the number of iterations through a FOR loop is known before the loop is ent

Semidifference via EXCEPT and JOIN - SQL SELECT * FROM (SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' EXCEPT DISTINCT CORRESPONDING SELECT StudentId