Cursors

A cursor is a device that is used to retrieve a set of records from a table/view into memory. Cursors allow each of the records to be read into the code block and then to be processed one at a time. A cursor can be compared to a book containing a page mark. Each of the pages is a record in the set of records retrieved when the cursor is executed. The bookmark indicates the current page. When using a cursor, Oracle always knows the current record. As one record is read into the code block, the current record is changed, just as the bookmark is changed as a page is read. Cursors are important tools for the processing of records. They allow the developer to bring records into the code block and to process them by using a complex set of ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.