What is a cursor how does it work?

Technology CommunityCategory: SQLWhat is a cursor how does it work?
VietMX Staff asked 3 years ago

Cursor is a database object used to manipulate data in row-by-row basis. Steps involved:

  • Declare a cursor
  • Open a cursor
  • Fetch row from the cursor
  • Process the row fetched
  • Close the cursor
  • Deallocate the cursor.