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
Autonomous versus Nested Transactions Though an autonomous transaction is started by the other transaction, it is not a nested transaction for the reasons shown below: (i)

Need to change mysql query to PDO Project Description: I want someone to convert me 1 .php file that includes some sql/mysql stuff to PDO is a very small file. Skills requ

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

%ISOPEN The Oracle closes the SQL cursor automatically after executing its related SQL statement. As a result, the %ISOPEN forever yields FALSE.

IN OUT Mode An IN OUT parameter passes initial values to the subprogram being called and return efficient values to the caller. Within the subprogram, an IN OUT parameter acts

Synonyms You can create the synonyms to provide location transparency for the remote schema objects like tables, views, sequences, stand-alone subprograms, and packages. Though,

OUT Mode An OUT parameter returns values to the caller of a subprogram. Within the subprogram, an OUT parameter act like a variable. That means that you can use an OUT formal

Cursor Variables As Parameters You can declare the cursor variables as the formal parameters of the functions and procedures. In the illustration below, you define the REF CUR

Rephrase Conditional Control Statements When computing a logical expression, the PL/SQL uses short-circuit evaluation. That is, the PL/SQL stops evaluating the expression as s

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