Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is real world uses of cursors?

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
What is real use of cursors, why we shuould have cursor in a select statement when we can return the rows without using cursors?

Thanks
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With a cursor you can step through and process the rows in a ResultSet one by one.



In this not working code example you can process the Resultset with the help of a cursor one by one.
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So when we are iterating over a resultset we are using a cursor, but it is implecit, that was something which i did not know.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic