Opening a cursor, PL-SQL Programming

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 using the FOR UPDATE clause, the OPEN statement also locks these rows. An illustration of the OPEN statement is as shown:

DECLARE

CURSOR c1 IS SELECT ename, job FROM emp WHERE sal < 3000;

...

BEGIN

OPEN c1;

...

END;

The Rows in the result set are not retrieved when the OPEN statement is executed. Instead, the FETCH statement retrieves the rows.

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







Related Discussions:- Opening a cursor, Assignment Help, Ask Question on Opening a cursor, Get Answer, Expert's Help, Opening a cursor Discussions

Write discussion on Opening a cursor
Your posts are moderated
Related Questions
First Step at defining type SID in SQL CREATE TYPE SID AS ( C VARCHAR(5) ) ; Explanation: TYPE SID announces that a type named SID is being defined to the syst

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

Using EXTEND To enlarge the size of a collection, use EXTEND. This process has 3 forms. The EXTEND appends one null element to a collection. And the EXTEND(n) appends n null e

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

SQL outer join SELECT * FROM IS_CALLED NATURAL LEFT JOIN IS_ENROLLED_ON Note that adding LEFT to an invocation of CROSS JOIN has no effect unless the right-hand operand

Expression: This is a randomly complex combination of constants, variables, literals, operators, & function calls. The simplest expression consists of a single variable. If th

EXCEPTION_INIT Pragma The pragma EXCEPTION_INIT relates an exception name with an Oracle error number. Which allow you to refer to any internal exception by the name and to wri

Usefulness of Data Type In SQL, as in most computer languages, a type can be used for constraining the values that are permitted to be used for some purpose. In particular, i

IF Statement The IF statement executes a series of statement conditionally. Whether the series is executed or not depends on the value of the Boolean expression. Syntax:

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