|Lesson 8|| Building a Cursor Block|
|Objective||Describe how to Build a Cursor Block |
Building Cursor Block
In this lesson, you will build a cursor block by using the concepts that you have learned so far.
Follow these steps to build a cursor block:
- Define a cursor.
- Open the cursor.
- Repeatedly fetch the data to process it.
- Close the cursor.
In the following Slide Show, the cursor block
- selects the product name and its inventory count from the product table,
- opens the cursor,
- fetches records into the cursor,
- displays the information, then
- closes the cursor.
Build Cursor Block
Now you have learned about the basic structure of a cursor block and how to build one, how to open a cursor, how to fetch the records, and how to close the cursor.
In the next lesson, we will look at the cursor
FOR loop, an alternate way to write cursor blocks.
Build Cursor Block Steps
Ad Oracle PL/SQL Programming