What are cursor?where are they used?

Answer Posted / sohini

Whenever you issue a SQL statement, the Oracle server opens
a SQL work area in memory in which the command is parsed
and executed. This area is called a cursor.There are two
type of cursors:
Implicit Cursor:PL/SQL declares a cursor implicitly for all
SQL data manipulation statements, including queries that
return only one row.PL/SQL manages this cursorautomatically.
Explicit Cursor:The programmer explicitly declares and
names an explicit cursor for queries that return more than
one row.it is managed by the programmer.
Explicit cursors are used when one wants to do some
processing with a set of rows fetched from a table or
multiple table.They are managed using OPEN,FETCH and CLOSE.
4 attributes are used in both types of cursors:%FOUND,%
NOTFOUND,%ROWCOUNT and %ISOPEN.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?

1496


How to bring a tablespace online?

512


What is Reduced List of Values?

1693


material view and view disadvantages?

628


What is the sid in oracle?

525






How to pass parameters to procedures in oracle?

565


Are truncate and delete commands same? If so why?

644


What is program global area (pga) in oracle?

600


What is a data dictionary and how can it be created?

606


How to export data with a field delimiter?

578


What is enter substitution variable in oracle?

561


What is a initialization parameter file in oracle?

575


Explain the use of rows option in exp command.

577


What is the Tune Query

1835


What privilege is needed for a user to insert rows to tables in another schema?

550