What is a cursor and what is its function?

An embedded sql statement may return a number of rows while the programming language can only access one row at a time. The programming device called a cursor controls the position of the row.

Showing Answers 1 - 10 of 10 Answers

Shakil

  • May 1st, 2006
 

I would like to make it very clear, for all my other my friends, who come to visit this Web side, that CURSOR is not a device( like any other computer Part), it is a small file, which can be open,read, and close like any other files, but the terminology is used as FATCH Instead of read.

Shakil Aslam.      

  Was this answer useful?  Yes

SHANKER

  • Nov 9th, 2006
 

hi friends,

             In DB2 actually we use CURSOR when there are more than one row to be fetched in a SELECT statement.

nnina

  • Oct 12th, 2009
 

Cursor is a programming device.  If you want to fetch more than one record from DB2 table it can be easily done with the help of cursor because single DB2 query fetch at a time one record if it find more than one records (Duplicate) it will gives -811 (trying to retrieve more than one row).

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions