What Is Cursor In DBMS, Explain Cursor With Examples In DBMS

Cursor
The Oracle server uses a area for its internal processing in order to execute an SQL statement.
PL/SQL allows you to name this area.
This work area is private to SQL’s operations and is called a Cursor.
A cursor acts as a handle or pointer into this area.
The data that is stored in the cursor is called the Active Data Set.
When you declare a cursor, you get a pointer variable, which does not point any thing.
When the cursor is opened, memory is allocated and the cursor structure is created.
When the cursor is closed the memory allocated for the cursor is released.
Examples:
When a user fires a select statement as,
SELECT empno, ename, job,salary FROM employee WHERE deptno=20;

0 comments:
Post a Comment
Thanks For Your Comment. We Get Back To You As Soon As Possible.