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
IF Statement The IF statement executes a series of statement conditionally. Whether the series is executed or not depends on the value of the Boolean expression. Syntax:

LEVEL You use the LEVEL with the SELECT CONNECT BY statement to categorize rows from a database table into a tree structure. The LEVEL returns the level number of a node in a

Name Resolution   During the compilation, the PL/SQL compiler relates identifiers like the name of a variable with an address or memory location, actual value, or datatype. Th

Comparison Operators The Comparison operators can compare one expression to another. The outcome is always true, false, or null. Usually, you use a comparison operators in condi

Example of Cast Operator So long as CAST is used as shown, we could obtain the total marks for each exam in similar fashion, using SUM (Mark) AS TotalMarks. However, this giv

Cursor Attributes   The Cursors and cursor variables have 4 attributes which give you helpful information about the execution of a data manipulation statement. Syntax:

This is a Customer Management project. Customer data is presented in a text file. The program will load this text data into its DB columns. The data mapping is user definable. User

Declaring Objects: You can use the object types wherever built-in types like CHAR or NUMBER can be used. In the block below, you can declare object r of type Rational. Then, yo

Description: Demonstrate your knowledge of PL/SQL programming by writing and thoroughly testing triggers and stored procedures associated with an e-commerce application that pr

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr