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
Functions The function is a subprogram which can take parameters and be invoked. Normally, you can use a function to calculate a value. The function has 2 sections: the specifi

Example of Check Constraints Example: Workaround for when subqueries not permitted in CHECK constraints CREATE FUNCTION NO_MORE_THAN_20000_ENROLMENTS ( ) RETURNS BOOLEAN

Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no

Parameter and Keyword Description: record_type_name: This identifies the user-defined type specifier that is used in the subsequent declarations of the records. NOT N

Parameter and Keyword Description: type_name: This identifies a user-defined type specifier that is used in the subsequent declarations of the objects. AUTHID Clause:

Records Records are the items of the type RECORD. The Records have exclusively named fields that can store the data values of various types. And hence, a record treat associate

Parameter and Keyword Description: SQL: This SQL is the name of the implicit SQL cursor. %FOUND: This attribute results TRUE if an INSERT, DELETE, or UPDATE state

Develop Data Business Intelligence Project Project Description: We are linking our Microsoft SQL Database to GoodData Business Intelligence. We are seeking somebody who has e

Avoiding Collection Exceptions   In many cases, if you reference a nonexistent collection element, then PL/SQL raises a predefined exception. Consider the illustration shown b

Effects of NULL for union - SQL The treatment of NULL in invocations of EXCEPT is as for UNION. This is different from its treatment in those of NOT IN and quantified compari