What is implicit cursor in Oracle?

          

What is implicit cursor in Oracle?

<<Previous  Next>>

Oracle - What is implicit cursor in Oracle? - Feb 07, 2010 at 14:20 PM by Shuchi Gauri

What is implicit cursor in Oracle?

PL/SQL creates an implicit cursor whenever an SQL statement is executed through the code, unless the code employs an explicit cursor. The developer does not explicitly declare the cursor, thus, known as implicit cursor.

E.g.:

In the following UPDATE statement, which gives everyone in the company a 20% raise, PL/SQL creates an implicit cursor to identify the set of rows in the table which would be affected.

UPDATE emp
SET salary = salary * 1.2;

Oracle - What is implicit cursor in Oracle? - April 10, 2009 at 11:00 AM

What is implicit cursor in Oracle?  

An implicit cursor is a cursor which is internally created by Oracle.
It is created by Oracle for each individual SQL. 

Oracle - What is implicit cursor in Oracle? - June 18, 2009 at 15:00 PM

A session contains a single implicit cursor which is defined automatically by PL/SQL.
The cursor gets assigned to represent the execution of a statement whenever it is executed.

Following are the attributes of the implicit cursor:

Attribute                                Status                    Condition
SQL%FOUND                     TRUE                     if the SQL statement has changed any rows
SQL%NOTFOUND             TRUE                     if the SQL statement has not changed any rows               
SQL%ROWCOUNT            -                              The number of rows affected by the SQL statement
%ISOPEN                             TRUE                     if there is a SQL statement being associated to the cursor. 

Also read

Oracle cursors interview questions

What a SELECT FOR UPDATE cursor represent?, What WHERE CURRENT OF clause does in a cursor?, Can you pass a parameter to a cursor?, Explain the functioning of CURSOR FOR LOOP with example., Define Simple/Explicit , Parametric and Internal/Implicit cursor.............

What is the difference between REF Cursor & Normal Cursor in oracle?

Normal cursors fall under the category of static cursors while REF cursors are dynamic.........

What is use of a cursor variable in oracle?

A cursor variable works like pointer in C. It is used to hold address of an item rather than the item itself. Cursor variables can be used to hold different values at run time.............

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 

 
Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring