Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


what is a cursor

Answers were Sorted based on User's Feedback



what is a cursor..

Answer / ganesh

cursor is a small work area like memory which are given by
oracle to execute sql statement, after execution this space
are made free for another sql staments to execute.

when we use the cursor with cursor name for a tble,then
that cursor will bring those from database one by one and
will keep in cursor memory for execution.

Is This Answer Correct ?    10 Yes 2 No

what is a cursor..

Answer / 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

what is a cursor..

Answer / t.r.sekhar

cursor is a temporary buffer used to hold the transactional
data for the manipulation purpose.
data will not permanently stored in database.
it is not reusable.

syntax:
cursor <cursor name> is <select stmt);
we have two types of cursors are there.
1.implicit cursors-automatically created whenever dml
statements are executed.
2.explicit cursors-created by user

Is This Answer Correct ?    3 Yes 0 No

what is a cursor..

Answer / suriya

Cursor is a mechanism by which we can name a 'select
stataments' and manipulate the information within that.
They are very useful, when we need to run a particular SQL
repeatedly.
Cursors are of 2 types, Implicit and Explicit.
Implicit Cursors: All the select statements we run are
implicitly stored in a cursor, by default. They are defined
by oracle.
Explicit Cursors: This is like user defined cursor. The
user can declare and use a cursor of his own requirement.
The operations performed with a cursor are declaring,
opening,fetching and closing.
Note:Leaving a cursor unclosed, will cause error.

Is This Answer Correct ?    1 Yes 0 No

what is a cursor..

Answer / kishor

Cursor is a pointer to the context area where data is
stored and fetched row by row.

Is This Answer Correct ?    1 Yes 0 No

what is a cursor..

Answer / gourvendra singh

A Cursor is a handle (a name or pointer) for the memory
associated with a specific statement. It is of two type
Implicit and explicit, we usually create explicit cursor
for our sql statements, we can also save them by providing
them a name.

Is This Answer Correct ?    2 Yes 2 No

what is a cursor..

Answer / nageswara rao

cursor acts as datatype for holding composite
variable.composite variable hold more than one value at a
time.

when ever u declare a cursor it tells to sqlserver that
memory is create for that cursor
whenever u open the cursor it executes select statement in
declare section and reserves memory stored the result of
execution in this memory.and reserves pointer to the before
first

Is This Answer Correct ?    1 Yes 1 No

what is a cursor..

Answer / 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

what is a cursor..

Answer / guest

returns multiple tuples from a table

Is This Answer Correct ?    0 Yes 1 No

Post New Answer



More SQL PLSQL Interview Questions

what are the authentication modes in sql server? How can it be changed? : Sql dba

0 Answers  


Table name: T1, it has only one column. col1 ------ c b a b b b b d s a a t s Requirement: I need the following output from the above base table by using SQL query. col1 Cnt ----- ------- a 3 b 5 Others 5 Please help. Thanks Guru v.gurus@in.com

11 Answers  


Does pdo prevent sql injection?

0 Answers  


Does execute immediate commit?

0 Answers  


how to get a list of indexes of an existing table? : Sql dba

0 Answers  






What is latest version of sql?

0 Answers  


I have a small PL/SQL Block assume in this way begin select * from emp where empno=100; exception when others then <Some Messages> when no_data_found then <Some Messages> when too_many_rows then <Some Messages> end; The question which he asked was whether this block will get executed normally or it will throw error ? If errored out then what is the reason for the error ? Could anybody please help me ? Regards Nakul Venkataraman

3 Answers   Satyam,


How do I clear the screen in sql plus?

0 Answers  


How to use distinct and count in sql query? Explain

0 Answers  


25.67,-1 Trunc = 20 Round= 30 HOW????

2 Answers   Karrox,


explain advantages of innodb over myisam. : Sql dba

0 Answers  


What is the use of primary key?

0 Answers  






Categories