what is a cursor

Answer Posted / s.syam sundar

oracle uses a private area to process and store data.this
private area is called as cursor

we have two types of cursors
they are implict and explict
implict cursor:- it is a cursor which controlled by oracle
itself
Ex: select statmets,insert,update and delete statmets

explict cursors:- it is a cursor which controlled by
programmer

controlling means
open cursor
fetch into
close cursor

Ex: create cursor c1(cursor name) as select * from emp
where deptno =10;( this is in declarative section)


in excutable section:
open cursor c1;
fetch cursor c1 into some veriable or table name;
......
.....
close c1

we can use parameters in cursors

and we can not assiagn cursor name to a variable

and we need not use cursor statemets in for update cursor
because it will take care of

regards
S.syam sundar

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different set operators available in sql?

565


How to test for null values?

606


How does one load ebcdic data? : aql loader

651


what is datawarehouse? : Sql dba

569


How to make a copy values from one column to another in sql?

576






What can I use instead of union in sql?

517


Name the different types of indexes in sql and define them.

570


How many triggers can be applied on a table?

515


how to add a new column to an existing table in mysql? : Sql dba

582


Is pl sql better than sql?

550


How many clustered indexes can you have?

534


What is snowflake sql?

582


Which is better varchar or nvarchar?

550


Can we use commit inside a trigger?

529


How many indexes can be created on a table in sql?

496