Skip to content
Related Articles

Related Articles

Improve Article

Difference between Implicit and Explicit Cursors

  • Last Updated : 13 Jul, 2021

Databases such as ORACLE have a memory area, where processing of instructions and fetched data takes place.A cursor is a pointer which is pointing to this area.The data contained in this memory area is also known as Active Set. Cursors can be broadly classified into Implicit Cursors and Explicit Cursors

Difference between Implicit and Explicit Cursors : 

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.



Implicit CursorsExplicit Cursors
Implicit cursors are automatically created when select statements are executed.Explicit cursors needs to be defined explicitly by the user by providing a name.
They are capable of fetching a single row at a time.Explicit cursors can fetch multiple rows.
They are more vulnerable to errors such as Data errors, etc.They are less vulnerable to errors(Data errors etc.)
Provides less programmatic control to the usersUser/Programmer has the entire control.
Implicit cursors are less efficient.Comparitive to Implicit cursors, explicit cursors are more efficient.

Implicit Cursors are defined as: 

SELECT attr_name from table_name


Explicit cursors are defined as: 

CURSOR cur_name IS
SELECT attr_name from table_name 


Implicit cursors requires anonymous buffer memory for storage purpose.Explicit cursors use user-defined memory space for storage purpose
Cursor attributes use prefix “SQL”. 
Structure for implicit cursors: SQL%attr_name 
Few implicit cursors attributes are: SQL%FOUND, SQL%NOTFOUND, SQL%ROWCOUNT
Structure for explicit cursors: cur_name%attr_name 

Few explicit cursors are: cur_name%FOUND, cur_name%NOTFOUND, cur_name%ROWCOUNT


My Personal Notes arrow_drop_up
Recommended Articles
Page :