What is the use of cursor ? how cursor allocate context area for executing the sql statement?

Answer Posted / anil kumar jaiswal

cursor :

Oracle create a memory area called context area to execute sql statements. that context area keep all information about the statement processed.
cursor is just a pointer to that context area and you can also say a cursor is pointing to result set of a query.
Types cursor :
1.Implicit cursor : implicit cursor automatically created by oracle when ever there is dml operation performed inside pl/sql block.(dml operation means insert,update,delete).
2. Explicit Cursor : its a user defined cursor, user need to define it explicitly.
cursor declared in declaration section called explicit cursor.

Cursor Attributes : there is 4 types of cursor attributes used.
1.%notfound.
2.%found.
3.%isopen
4.%rowcount.
for more queries contact me on aniljaiswal143@gmail.com.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is sql profiler? : Sql dba

793


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

890


Can a select statement fire a trigger?

887


What are the different sql commands?

722


What is data modelling in sql?

709






How sql query is executed?

782


How do temporal tables work?

692


What are inner and outer joins examples of both?

691


What is linq to sql?

769


What are all the common sql functions?

751


what are the different type of sql's statements ? : Sql dba

699


What is rownum in sql?

762


Which table is left in left join?

715


What does inner join mean?

757


Can ddl statements be used in pl/sql?

795