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
Recursion The Recursion is a powerful method for simplify the design of the algorithms. Principally, the recursion means the self-reference. In the recursive mathematical serie

Data Types in SQL - Decimal DECIMAL, NUMERIC, REAL, FLOAT and various other terms for various sets of rational numbers. When these key words are specified for the declared typ

Controlling Cursor Variables You use 3 statements to control the cursor variable: OPEN-FOR, FETCH, & CLOSE. At First, you OPEN a cursor variable FOR a multi-row query. Then, y

Anatomy of a Table: Figure shows the terminology used in SQL to refer to parts of the structure of a table. As you can see, SQL has no official terms for its counterpa

EXIT-WHEN The EXIT-WHEN statement permits a loop to complete conditionally. Whenever the EXIT statement is encountered, the condition in the WHEN clause is computed. When the co

This task involves developing some functions that extract data from an SQL database. The scenario is that a company which owns an online vehicle search website wants to generate so

Relational Algebra - SQL It describes some operators, that together constitute an algebra that is not only relationally complete but also irreducibly so (very nearly- apart f

I need SQL Data Base Project Description: Network SQL database and SQL Setup two 4 workstation Skills required are Data Entry, MySQL, SQL

Anatomy of a Command Figure, showing a simple SQL command, is almost identical to its counterpart in the theory book. The only difference arises from the fact that SQL uses a

Example of GROUPBY Operator Example: How many students sat each exam, using GROUP BY, NATURAL LEFT JOIN, and COALESCE SELECT CourseId, COALESCE (n, 0) AS n FROM COURS