What is a cursor ? Why Cursor is required ?

 Cursor is a named private SQL area from where information can be accessed. Cursors  are  required  to  process rows individually for queries returning multiple rows.

Showing Answers 1 - 22 of 22 Answers

chandrakant

  • Oct 16th, 2005
 

cursor retrive data from a table. it can be done in two level

1 %type it retrive data from a particular row

2 %rowtype it retrive data from a full table

  Was this answer useful?  Yes

Santapan

  • Oct 19th, 2005
 

Cursor is a handler or pointer to Oracle Context Area.Context area is a memory space used for processing of sql statements.

  Was this answer useful?  Yes

pravinkumar

  • Dec 27th, 2005
 

Cursor is a named private SQL area also called as context area from where information can be accessed. Cursors  are  required  to  process rows individually for queries returning multiple rows. there are three types of cursors
1. Static Cursor
   * Implicit Cursor
   * Explicit Cursor
2. Dynamic Cursor
3. Reference Cursor

  Was this answer useful?  Yes

brcprasanna

  • Apr 12th, 2006
 

cursor is a pointer or a handle for the pga(program global area)

using cursors,we can access more than one row which we cant do using select stt,

the second one is,we r using only a small part of memory so,the access time is lesser and hence the performance is more

  Was this answer useful?  Yes

thiyagarajan

  • May 24th, 2007
 


CURSOR

Whenever a sql statement is issued, at that time oracle server will allocate some memory area to execute and parse that sql statement. That data area is called as cursor.

Two types : IMPLICIT, EXPLICIT


IMPLICIT
-----------
(1) Called as SQL.
(2) Never user CURSOR keyword explicitly
(3) Memory allocation and program controll will done automatically
(4) Returns or updates or deletes only one record.
(5) Attributes : SQL%FOUND, SQL%NOTFOUND

EXPLICIT
-----------
(1) called as cursors
(2) Uses CURSOR keyword explicitly
(3) Memory allocation and program control thru the cursor written.
(4) Returns or updates or deletes multiple records.
(5) Attributes : SQL%FOUND, SQL%NOTFOUND, %ISOPEN, %ROWCOUNT

BAMBINO

  • Jul 15th, 2007
 

In order to process sql statement oracle allocate an area of memory known as context area. Context area hold all the necessary information to process the sql statment including the no. of rows processed by the sql statment.

Cursor is a handler or a pointer to the context area. throught cursor pl/sql program can control the context area and what happens to it as the statment process.

Most common operation using cursor is to fetch data rows in the active set.

  Was this answer useful?  Yes

g_sidhu

  • Feb 16th, 2008
 

A cursor is a private SQL work area. Whenever you issue a SQL statement, the Oracle server opens an area of memory in which the command is parsed and executed. This area is called a cursor. Cursor is a named private SQL area from where information can be accessed. Cursors  are  required  to  process rows individually for queries returning multiple rows.

  Was this answer useful?  Yes

Oracle uses work areas called private SQL area to Execute Sql statements and   store  information. A cursor is a mechanism by which we can assign name to that private sql area , there by  access information stored in it.

In Pl/Sql block if a query returns more than one row it raises an exception TOO_MANY_ROWS. Using cursors mechanism  we can process multiple rows returned by the query in pl/sql blocks.

rahulg5211

  • Oct 4th, 2009
 

Cursor is an small memory allocation or workstation where operation or processing is done on the data.

Types of attribute of cursor are-:
1)ROWCOUNT
2)ISOPEN
3)FOUND
4)NOTFOUND

  Was this answer useful?  Yes

Rounak037

  • Jan 22nd, 2020
 

Cursor is used when the user needed to update record in a single or in row buy row manner in a database table, Cursor is required to process rows individually for queries returning multiple rows.
Basically cursor are two types:
1. Implicit Cursor.
2. Explicit Cursor.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions