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
Package STANDARD package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available a

Example of Table Literal - SQL Example: A Table Literal (correct version) VALUES ('S1', 'C1', 'Anne'), ('S1', 'C2', 'Anne'), ('S2', 'C1', 'Boris'), ('S3', 'C3'

RETURN Statement The RETURN statement instantly completes the execution of a subprogram and returns control to the caller. The Execution then resumes with the statement below t

Declaring Records Whenever you define a RECORD type, you may declare records of that type, as the illustration shows: DECLARE TYPE StockItem IS RECORD ( item_no INTEG

I need a query for PL/SQL, selecting names with cursor, goes down the list, assigns usernames (initials001) based on initials in the name. If two names have same initials the user

Creating a SQL file 1. Open a new file in Notepad++ and save it to the location c:\mysql\bin, with the name lab8script.sql (the file extension should be .sql ). Add a MySQL co

Project Description: I am looking to change FullCalendar to add/delete sql server data when events are removed or dropped from Calendar. Events should only be included by dra

Example of WHEN or THEN Constraints A concrete example showing how SQL supports WHEN/THEN constraints CREATE TABLE SAL_HISTORY (EmpNo CHAR (6), Salary INTEGER NOT NULL,

SQL Cursor   The Oracle implicitly opens a cursor to process each SQL statement not related with an explicit cursor. The PL/SQL refers to the most current implicit cursor as t

Using the BULK COLLECT Clause The keywords BULK COLLECT specify the SQL engine to bulk-bind output collections before returning them to the PL/SQL engine. You can use these ke