Explicit cursors, PL-SQL Programming

Explicit Cursors

The set of rows returned by the query can include zero, one, or multiple rows, depending on how many rows meet your search criteria. Whenever a query returns a multiple row, you can explicitly declare the cursor to process the rows. Furthermore, you can declare a cursor in the declarative part of any PL/SQL subprogram, block, or package.

You use 3 commands to control the cursor: OPEN, FETCH, & CLOSE. At First, you initialize the cursor with the OPEN statement that identifies the result set. Then, you use the FETCH statement to recover the first row. You can execute FETCH frequently until all rows have been retrieved. When the final row has been processed, you discharge the cursor with the CLOSE statement. You can process few queries in parallel by declaring and opening the multiple cursors.

Posted Date: 10/4/2012 3:50:37 AM | Location : United States







Related Discussions:- Explicit cursors, Assignment Help, Ask Question on Explicit cursors, Get Answer, Expert's Help, Explicit cursors Discussions

Write discussion on Explicit cursors
Your posts are moderated
Related Questions
UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p

Using research notes and Oracle documentation plan and execute an upgrade of an installation of Oracle 10g to Oracle 11g release 1. To do this you must show in screen shots and wri

Using Pragma RESTRICT_REFERENCES: The function called from the SQL statements should obey certain rules meant to control the side effects. To check for violation of the rules,

Initial thought process: Design a script which was simple and user friendly. Integrate procedures/functions to extract data under the hood. I focused on giving the user the opt

Initializing Objects: Till you initialize an object by calling the constructor for its object type, the object is automatically null. That is, the object itself is null, not me

Important Distinctions The list of important distinctions are given below: Value versus variable Syntax versus semantics Variable versus variable reference

Using Operator VALUE: As you may expect, the operator VALUE returns the value of an object. The VALUE takes its argument a correlation variable.  For illustration, to return a

Grouping and Ungrouping in SQL Example specifying EXAM_MARK in place of COURSE in the main FROM clause. Example: Obtaining C_ER2 from EXAM_MARK SELECT CourseId, CAST

Second Step at defining type SID in SQL CREATE TYPE SID AS VARCHAR(5) ; Explanation: TYPE SID announces that a type named SID is being defined to the system.

Recursion versus Iteration Dissimilar the iteration, recursion is not crucial to PL/SQL programming. Any problem which can be solved using recursion can be solving using the it