Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
23 views
11 pages
Cursors and Its Usage
Uploaded by
Sai Dhanush
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
Download
Save
Save Cursors and Its Usage For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
23 views
11 pages
Cursors and Its Usage
Uploaded by
Sai Dhanush
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
Carousel Previous
Carousel Next
Download
Save
Save Cursors and Its Usage For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Cursors and Its Usage For Later
You are on page 1
/ 11
Search
Fullscreen
Cursors And Its Usage
G.SAI DHANUSH
237R5A0527
DBMS
SlideMake.com
Introduction to Cursors
Cursors are database objects used to retrieve
and manipulate data in a set.
They are commonly used in SQL programming
to navigate through a result set.
Cursors provide a way to process individual
rows of a query result one at a time.
Types of Cursors
There are three types of cursors in SQL:
forward-only, static, and dynamic.
Forward-only cursors allow fetching rows only
in a forward direction.
Static cursors create a temporary copy of the
data and are not affected by changes made to
the underlying data.
Types of Cursors (cont.)
Dynamic cursors reflect changes made to the
underlying data when fetched.
Cursors can also be classified as read-only or
updatable, depending on whether they allow
modifications to the data.
Choosing the appropriate cursor type is crucial
for efficient data processing.
Declaring and Opening Cursors
To use a cursor in SQL, you first need to declare
it using a DECLARE statement.
After declaration, the cursor is opened using the
OPEN statement to execute the associated
query.
Opening a cursor establishes a result set that can
be navigated using FETCH statements.
Fetching Data with Cursors
Once a cursor is opened, data can be retrieved
row by row using FETCH statements.
The FETCH statement moves the cursor
position to the next row in the result set.
Cursors provide granular control over data
retrieval and processing.
Closing Cursors
After processing data with a cursor, it is
essential to close the cursor using the CLOSE
statement.
Closing a cursor releases the resources
associated with it and frees up memory.
Failing to close a cursor can lead to memory
leaks and performance issues.
Cursor Limitations
Cursors can be inefficient for processing large
result sets due to their row-by-row processing
nature.
They may also lead to performance issues and
increased server load.
It is recommended to use set-based operations
instead of cursors whenever possible for better
performance.
Best Practices for Cursor Usage
Minimize the use of cursors by opting for set-
based operations like JOINs and subqueries.
Use cursors only when necessary for specific
row-level processing tasks.
Always remember to close the cursor after
completing the data processing to prevent
resource leaks.
Conclusion
Cursors are valuable tools for navigating and
processing data in SQL programming.
Understanding the types of cursors and their
appropriate usage is crucial for efficient
database operations.
By following best practices and considering the
limitations of cursors, developers can optimize
their data processing workflows.
THANK
YOU
You might also like
DB2 Cursor
PDF
100% (2)
DB2 Cursor
18 pages
What Is CURSOR in PL
PDF
No ratings yet
What Is CURSOR in PL
5 pages
Cursors in SQL
PDF
No ratings yet
Cursors in SQL
5 pages
SQLDEV320A Week 9-1
PDF
No ratings yet
SQLDEV320A Week 9-1
38 pages
PLSQL 5 1 SG
PDF
No ratings yet
PLSQL 5 1 SG
39 pages
Cursors
PDF
No ratings yet
Cursors
28 pages
Automatic Examination Seating Arrangement System
PDF
No ratings yet
Automatic Examination Seating Arrangement System
41 pages
Oracle 10g Cursor Concepts
PDF
100% (1)
Oracle 10g Cursor Concepts
11 pages
Cursors Le1
PDF
No ratings yet
Cursors Le1
12 pages
Cursors
PDF
No ratings yet
Cursors
4 pages
Cursor
PDF
No ratings yet
Cursor
3 pages
Unit 4
PDF
No ratings yet
Unit 4
23 pages
Cursor in SQL Server
PDF
No ratings yet
Cursor in SQL Server
9 pages
Honeywell Pro-Watch XProtect Access Integration User's Manual
PDF
No ratings yet
Honeywell Pro-Watch XProtect Access Integration User's Manual
23 pages
CURSOR
PDF
No ratings yet
CURSOR
9 pages
Cursors
PDF
No ratings yet
Cursors
11 pages
3 Cursors
PDF
No ratings yet
3 Cursors
7 pages
Ceragon FibeAir IP-20G Technical Description 11.1 ETSI Rev A.01 PDF
PDF
100% (2)
Ceragon FibeAir IP-20G Technical Description 11.1 ETSI Rev A.01 PDF
322 pages
Do 254 HVP - WP PDF
PDF
0% (1)
Do 254 HVP - WP PDF
11 pages
SQL Misc 2
PDF
No ratings yet
SQL Misc 2
5 pages
Cursors
PDF
No ratings yet
Cursors
6 pages
Cours or
PDF
No ratings yet
Cours or
3 pages
Finals Prep CS405
PDF
No ratings yet
Finals Prep CS405
4 pages
Live Book
PDF
No ratings yet
Live Book
748 pages
PL SQL Cursor
PDF
No ratings yet
PL SQL Cursor
3 pages
Cursor in SQL Server
PDF
No ratings yet
Cursor in SQL Server
3 pages
Procedural SQL - Part2: Database Management Systems II
PDF
No ratings yet
Procedural SQL - Part2: Database Management Systems II
21 pages
Scroll Cursors 2
PDF
No ratings yet
Scroll Cursors 2
12 pages
SQL cursorsMCA1B
PDF
No ratings yet
SQL cursorsMCA1B
2 pages
Week-6-Accessing Databases
PDF
No ratings yet
Week-6-Accessing Databases
11 pages
5.2 PLSQL Chapter 5 PDF
PDF
No ratings yet
5.2 PLSQL Chapter 5 PDF
7 pages
BDA Cursores
PDF
No ratings yet
BDA Cursores
38 pages
Cursor in SQL
PDF
No ratings yet
Cursor in SQL
3 pages
Cursor
PDF
No ratings yet
Cursor
33 pages
SQL Interview Questions 2
PDF
No ratings yet
SQL Interview Questions 2
43 pages
Les 05
PDF
No ratings yet
Les 05
24 pages
Cursors & Triggers
PDF
No ratings yet
Cursors & Triggers
48 pages
Lecture 6 1
PDF
No ratings yet
Lecture 6 1
25 pages
Cursor in DB2
PDF
No ratings yet
Cursor in DB2
41 pages
Cursor Trigger Merged
PDF
No ratings yet
Cursor Trigger Merged
3 pages
Using SQL Server Cursors: General Concepts
PDF
No ratings yet
Using SQL Server Cursors: General Concepts
6 pages
DBMS 2 - U 1 CUrsor
PDF
No ratings yet
DBMS 2 - U 1 CUrsor
3 pages
What Is Cursor? Define Different Type of Cursor?
PDF
No ratings yet
What Is Cursor? Define Different Type of Cursor?
2 pages
Practical No.8
PDF
No ratings yet
Practical No.8
2 pages
Cursor and Trigger
PDF
No ratings yet
Cursor and Trigger
24 pages
CURSOR
PDF
No ratings yet
CURSOR
8 pages
Letter To Field Office SD-WAN
PDF
No ratings yet
Letter To Field Office SD-WAN
126 pages
Under The Guidance of Mr. R.L.Kadam: Maharashtra State Board of Technical Education Mumbai
PDF
No ratings yet
Under The Guidance of Mr. R.L.Kadam: Maharashtra State Board of Technical Education Mumbai
14 pages
Chapter 8 Function Overloading PDF
PDF
100% (1)
Chapter 8 Function Overloading PDF
6 pages
Cursors Lecture
PDF
No ratings yet
Cursors Lecture
30 pages
Cursor
PDF
No ratings yet
Cursor
39 pages
Seoclarity SEO Roadmap Template
PDF
0% (1)
Seoclarity SEO Roadmap Template
19 pages
Cursor Handling
PDF
100% (1)
Cursor Handling
14 pages
Stored Procedure Iterate
PDF
No ratings yet
Stored Procedure Iterate
8 pages
Lab Assignment No.10
PDF
No ratings yet
Lab Assignment No.10
3 pages
Oracle 8i ch18
PDF
No ratings yet
Oracle 8i ch18
14 pages
CURSORS
PDF
No ratings yet
CURSORS
5 pages
Cursor
PDF
No ratings yet
Cursor
8 pages
Cursor
PDF
No ratings yet
Cursor
7 pages
Scrollable and Non-Scrollable Cursors
PDF
No ratings yet
Scrollable and Non-Scrollable Cursors
12 pages
Is 101 Module 1 Week 1
PDF
No ratings yet
Is 101 Module 1 Week 1
7 pages
Cursors: How To Step Through The Returned Set of Rows
PDF
No ratings yet
Cursors: How To Step Through The Returned Set of Rows
12 pages
SM5100 SM EN 2nd PDF
PDF
No ratings yet
SM5100 SM EN 2nd PDF
54 pages
(Embedded SQL) : What SQL Provides To AS/400 ?
PDF
No ratings yet
(Embedded SQL) : What SQL Provides To AS/400 ?
20 pages
Manual
PDF
No ratings yet
Manual
27 pages
0523 Pbi
PDF
No ratings yet
0523 Pbi
12 pages
Job Roadmap For Students (No Degree Required)
PDF
No ratings yet
Job Roadmap For Students (No Degree Required)
37 pages
Using The Multiple-Row FETCH Statement: Step 1:declare A Cursor
PDF
No ratings yet
Using The Multiple-Row FETCH Statement: Step 1:declare A Cursor
5 pages
Long Quiz: Quarter 3 03-22-23 #Purplewednesdays
PDF
No ratings yet
Long Quiz: Quarter 3 03-22-23 #Purplewednesdays
33 pages
A Presentation Report For Programming With Data Visualization
PDF
No ratings yet
A Presentation Report For Programming With Data Visualization
26 pages
0525 WT
PDF
No ratings yet
0525 WT
12 pages
Error Detection and Correction
PDF
No ratings yet
Error Detection and Correction
25 pages
Types of Graphs Explain Euler Graph With Examples in Destric Mathematics
PDF
No ratings yet
Types of Graphs Explain Euler Graph With Examples in Destric Mathematics
12 pages
Eyesi Indirect Brochure
PDF
No ratings yet
Eyesi Indirect Brochure
12 pages
0x08 Python - More Classes and Objects
PDF
No ratings yet
0x08 Python - More Classes and Objects
16 pages
Working With Cursors
PDF
No ratings yet
Working With Cursors
3 pages
Beginners Guide To Flowcode and Arduino
PDF
No ratings yet
Beginners Guide To Flowcode and Arduino
14 pages
SmartFleet Training Pack
PDF
No ratings yet
SmartFleet Training Pack
2 pages
237R5A0525
PDF
No ratings yet
237R5A0525
10 pages
0527 WT
PDF
No ratings yet
0527 WT
9 pages
Case Study - (Q & R) - DFC10033 - 1 2021 - 2022
PDF
No ratings yet
Case Study - (Q & R) - DFC10033 - 1 2021 - 2022
6 pages
1.creating Cursor: This Step Allocates Memory: Types of Cursors
PDF
No ratings yet
1.creating Cursor: This Step Allocates Memory: Types of Cursors
7 pages
Proposal - Website +software AMC For Cryptoconnect
PDF
No ratings yet
Proposal - Website +software AMC For Cryptoconnect
5 pages
App Store Optimization Tips - 15 ASO Case Studies
PDF
No ratings yet
App Store Optimization Tips - 15 ASO Case Studies
16 pages
Yarn Structure
PDF
No ratings yet
Yarn Structure
10 pages
Python Programming - Important - Previously Asked Questions - Python Programming - Study Glancep
PDF
No ratings yet
Python Programming - Important - Previously Asked Questions - Python Programming - Study Glancep
4 pages
School Forms Checking Report
PDF
No ratings yet
School Forms Checking Report
3 pages
Systimax Imvision Controller X Installation: Instruction Sheet
PDF
No ratings yet
Systimax Imvision Controller X Installation: Instruction Sheet
10 pages
Boost - Signals: Douglas Gregor
PDF
No ratings yet
Boost - Signals: Douglas Gregor
38 pages
Testtti - Google Search
PDF
100% (1)
Testtti - Google Search
2 pages
Mayuri Totare Java Developer 3 YOE
PDF
No ratings yet
Mayuri Totare Java Developer 3 YOE
1 page
Niranjan P B: Experience Certificates
PDF
No ratings yet
Niranjan P B: Experience Certificates
1 page
Data Entry Operator Resume Example
PDF
100% (1)
Data Entry Operator Resume Example
3 pages
Open Cola
PDF
No ratings yet
Open Cola
3 pages
Java Streams Explained: A Practical Guide with Examples
From Everand
Java Streams Explained: A Practical Guide with Examples
William E. Clark
No ratings yet
Oracle 11g Streams Implementer's Guide
From Everand
Oracle 11g Streams Implementer's Guide
Ann L. R. McKinnell
No ratings yet
Redshift Essentials: Definitive Reference for Developers and Engineers
From Everand
Redshift Essentials: Definitive Reference for Developers and Engineers
Richard Johnson
No ratings yet