Take FREE!! Online Cocubes Mock Test to Crack various Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
Take 30+ FREE!! Online Arithmetic Aptitude Mock test to crack any Exams.
Technical Discussion :: Oracle PLSQL

7 / 31

What is Cursor and How many types of Cursor you have used?

Answer:

Cursors help us to do an operation on a set of data that we retrieve by commands such as Select columns from a table. For example : If we have duplicate records in a table we can remove it by declaring a cursor which would check the records during retrieval.

There are mainly 2 types of cursors .
1) Implicit Cursor.
2) Explicit Cursor.

Implicit Cursor: Oracle will implicitly creates an area for the DML operations. Programmer will not have control on implicit cursors. The only useful attribute on this implicit cursor is SQL%ROWCOUNT , it will give the number of rows affected by the recent DML operation.

Explicit Cursor: created by the programmer and programmer have control on it Programmer can
1) Open 2) Close 3) Fetch
one by one and remove rows which have duplicate values.

Explicit Cursors are classified into
1) Normal cursor
2) Parameterized cursor
3) Cursor For Loops and
4) REF cursors

Asked In :: Syntel Inc.

Post Your Answer Here:


Rate This: +1 -0      +
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Most Popular Qs.