The Beauty of Cursors in Oracle PL/SQL Oracle cursors allow the developer to decide how and when data items are retrieved. Cursors can also be provided to other developers in the form of what is known as “reference cursors”, which basically provide a gateway to a set of data which has been previously filtered and extracted into memory. The type and use of cursor depends on the data and the business logic. They are a powerful method of manipulating data items. Cursors can be declared, opened, fetched and closed. Basically this means declare a cursor name to use as a handle representing a query for obtaining items. Open the cursor so that it can be used. Fetch the data required. Finally, when done close the cursor. Cursors also have attributes indicating when items are present or not. These are indicated via the attributes %FOUND and %NOTFOUND. Cursors can be used for simple data extraction, or for updating specific records based upon set criteria. Another useful feature of cursors is that they can have cursors which also contain cursors within the overall logic. This technique is frequently used when information from a detail table relies on related information from the master, or driving table. Variables can be used with cursors to allow more flexibility with regards to filtering data as it is extracted.