Cursor is a private SQL area created in SGA to do multi row operation in a PL/SQL programme

Explicit Cursor, Implicit Cursor.

Implicit Cursor: System (Oracle) automatically declares and uses for all DML SQL Statements.

Explicit Cursor: Cursor declared explicitly in the PL/SQL programme to do multi row operation

Syntax:


Declare
Cursor C1 is SELECT SAL, EMPNO FROM EMP
X number;
Y Varchar2(30);
Begin
Open C1;
Loop
Fetch C1 INTO x, y;
Exit when c1%NOTFOUND
End Loop;
End;

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)