ITP

MCA - Advanced Database Administration

What is Implicit explicit cursor

In : MCA Subject : Advanced Database Administration

Implicit cursor

As long as your code does not use an explicit cursor, PL/SQL creates an implicit cursor anytime you execute a SQL statement directly in your code.
Because you, the developer, do not explicitly specify a cursor for the SQL statement, it is called a "implicit" cursor.
Each UPDATE, DELETE, or INSERT statement you run in PL/SQL creates an implicit cursor.
In other words, even if you wanted to, you can't execute these statements within an explicit cursor.
Only when you run a single-row SELECT statement do you have the option of employing an implicit or explicit cursor (a SELECT that returns only one row).

Explicit Cursor

An explicit cursor is a SELECT statement that is expressly declared and given a name in the declaration part of your code.
For UPDATE, DELETE, and INSERT statements, there is no such thing as an explicit cursor.

You have complete control over how information in the database is accessed with explicit cursors.
When to OPEN the cursor, when to FETCH records from the cursor (and hence from the table or tables in the cursor's SELECT query), how many records to fetch, and when to CLOSE the cursor are all decisions you make.
Examining the cursor characteristics will reveal information about the present status of your cursor.

 

About us

A truly open platform where you may ask questions and get answers. We also provide comprehensive and easy-to-understand answers to question papers.  discover...

Site status

Flag Counter

Privacy Policy

Sitemap