adspace


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: cursor c1(cursor name) is 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 ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2090


how to use regular expression in pattern match conditions? : Sql dba

1111


what are aggregate and scalar functions? : Sql dba

1127


what are all the common sql function? : Sql dba

1131


If a cursor is open, how can we find in a pl/sql block?

1236


define sql insert statement ? : Sql dba

1098


What is the current version of postgresql?

1177


Can we use distinct and group by together?

1133


Is inner join faster than left join?

1274


Can we rollback truncate?

1074


Is primary key clustered index?

1018


what are the advantages of sql ? : Sql dba

1141


Can delete statement be rollbacked?

1053


What is the current version of sql?

1091


how to start mysql server? : Sql dba

1266