Why use cursor variables, PL-SQL Programming

Why Use Cursor Variables ?

Primarily, you use the cursor variables to pass the query result sets between the PL/SQL stored subprograms and different clients. Neither PL/SQL nor any of its clients owns a result set; they merely share a pointer to the query work region in which the result set is stored. For instance, Oracle Forms application, an OCI client, and Oracle server can all refer to the same work region.

A query work region remains accessible as long as any cursor variable points to it. Along with, you can pass the value of a cursor variable freely from one scope to other. For illustration, if you pass a host cursor variable to a PL/SQL block embedded in a Pro C program, the work region to which the cursor variable points remains accessible after the block done. If you comprise a PL/SQL engine on the client side, the calls from client to server force no restrictions. For illustration, you can declare a cursor variable on the client side, open & fetch from it on the server side then carry on to fetch from it back on the client side. You can also reduce the network traffic by having a PL/SQL block open (or close) some host cursor variables in a single round trip.

Posted Date: 10/4/2012 3:58:52 AM | Location : United States







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

Write discussion on Why use cursor variables
Your posts are moderated
Related Questions
BETWEEN Operator The operator BETWEEN, tests whether the value lies in a specified series. That means "greater than or equivalent to low value and less than or equivalent to hig

EXIT Statement   You can use the EXIT statement to exit a loop. The EXIT statement has 2 forms: the conditional EXIT WHEN and the unconditional EXIT. With the either form, you

Opening a Cursor Opening the cursor executes the query & identifies the result set that consists of all rows that meet the query search criteria. For the cursors declared usin

Processing Transactions This part describes how to do the transaction processing. You learn the fundamental techniques that safeguard the consistency of your database, involvin

Case Sensitivity Similar to all the identifiers, the variables, the names of constants, and parameters are not case sensitive. For illustration, PL/SQL considers the following n

Mixed Notation The fourth procedure call shows that you can mix the positional and named notation. In this situation, the first parameter uses the positional notation, & the s

LIKE Operator You use the LIKE operator to compare the character value to a pattern. The Case is significant. LIKE returns the Boolean value TRUE when the character patterns mat

DBMS_OUTPUT: The Package DBMS_OUTPUT enables you to display output from the PL/SQL subprograms and blocks, that makes it easier to test and debug them. The procedure put_ line

DECLARE : This keyword signals the beginning of the declarative section of the PL/SQL block, that contains local declarations. The Items declared locally exist only within the

Collection Methods:   The collection method is a built-in function or procedure which operates on the collections and is called using the dot notation. The methods like the C