Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
36 views10 pages

Cursor by Amit

Uploaded by

amitsh2523
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views10 pages

Cursor by Amit

Uploaded by

amitsh2523
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Cursor

By Amit Sharma(2202)
What is Cursor?
• Cursor is a Temporary Memory or Temporary
Work Station created in system memory.
• The oracle engine uses a work area for its
internal processing on order to execute an SQL
statement .
• The result data that is stored in the
cursor is called Active data set.
Types of Cursors.

➔ There are two types of Cursor


A) Implicit B) Explicit

➔ A) If the Oracle engine opened a cursor for its internal


processing it is known as an Implicit Cursor.
➔ B) A cursor can also be opened for processing data
through a PL/SQL block, on demand. Such a user
defined cursor is called Explicit Cursor.
Implict Cursor
➢ Definition: Implicit cursors are automatically created
And all process do by Oracle Engine.
➢ Usage: They handle single SQL operations, such as
INSERT, UPDATE, or DELETE.
➢ Accessing Data: You can use attributes like
%ROWCOUNT , %FOUND ,%NOTFOUND.
Explict Cursor
➢ Definition: Explicit cursors are user-defined Cursor,
Created And all process do by User.
➢ Usage: You declare an explicit cursor for a specific

SQL query and manage it using OPEN, FETCH, and


CLOSE statements.
➢ Accessing Data: You can use attributes like %ISOPEN
%ROWCOUNT , %FOUND ,%NOTFOUND.
How to use Explicit Cursor?

There are four steps in using an Explicit Cursor.

1. DECLARE the cursor in the Declaration section.


2. OPEN the cursor in the Execution Section.
3. FETCH the data from the cursor into PL/SQL
variables or records in the Execution Section.
4. CLOSE the cursor in the Execution Section
before you end the PL/SQL Block.
Thank
You

You might also like