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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.