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
Identifiers You use identifiers to name the PL/SQL program items and units that include constants, variables, cursors, exceptions, cursor variables, subprograms, and packages.

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

Need Database Development with Analysis Tools Project Description: I want a database for large governmental and private data sets on one country that can be simply extended t

Count Operator in SQL Example: Counting the students who have scored more than 50 in some exam (SELECT COUNT (*) FROM (SELECT DISTINCT StudentId FROM EXAM_MARK WHE

Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

Logical Operators The logical operators AND, NOT, and OR follow the tri-state logic shown in table below. The AND and OR are binary operators; NOT is a unary operator.

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

SQL Pseudocolumns The PL/SQL recognizes the following SQL pseudocolumns, that returns the specific data items: LEVEL, NEXTVAL, CURRVAL, ROWID, & ROWNUM. The Pseudocolumns are n

Pass the nulls to a dynamic SQL: Passing Nulls: Assume that you want to pass the nulls to a dynamic SQL statement. For illustration, you may write the EXECUTE IMMEDIATE

Attributes: Just similar to variable, an attribute is declared with a name and datatype. The name should be exclusive within the object type. The datatype can be any Oracle ty