<P> In computer science, a database cursor is a control structure that enables traversal over the records in a database . Cursors facilitate subsequent processing in conjunction with the traversal, such as retrieval, addition and removal of database records . The database cursor characteristic of traversal makes cursors akin to the programming language concept of iterator . </P> <P> Cursors are used by database programmers to process individual rows returned by database system queries . Cursors enable manipulation of whole result sets at once . In this scenario, a cursor enables the rows in a result set to be processed sequentially . </P> <P> In SQL procedures, a cursor makes it possible to define a result set (a set of data rows) and perform complex logic on a row by row basis . By using the same mechanics, a SQL procedure can also define a result set and return it directly to the caller of the SQL procedure or to a client application . </P>

What is the use of cursor in database