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
set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_divide then d

Committing and Rolling Back The COMMIT and ROLLBACK end the active autonomous transaction but do not exit the autonomous routine. As the figure shows, if one transaction ends,

I have a Pascal Source file that needs to be compiled into a Service. In addition, there are various functions (Pascal Procedures I guess) that need to be created to Read and Write

Deriving Predicates from Predicates in SQL The corresponding section in the theory book describes how predicates can be derived from predicates using (a) the logical connectiv

which operation is used if we are interested in only certain columns of a table?

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

Equivalences & Rewrite Rules: If notice that as well as allowing us to prove trivial theorems, and tautologies enable us to establish that certain sentences are saying the sam

Exception handling In the PL/SQL, a warning or error condition is known as an exception. The Exceptions can be internally defined (by the run-time system) or user defined. The

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

Parameter Modes   To define the behavior of formal parameters you use the parameter modes. The 3 parameter modes, IN, OUT, & IN OUT, can be used with any subprogram. Though, a