Chapter 2. Designing PL/SQL Code
The PL/SQL code construction can accommodate SQL to interact with the Oracle database for transactions or data retrieval. The data operations and activities such as iteration, comparison or manipulation is one of the major accomplishments of PL/SQL control structures. In a PL/SQL block, the data fetch strategy is realized through cursor structures. The design and handling of cursor structures forms the basis of the PL/SQL code design. In this chapter, we will understand the cursor structures in detail, their types and implementation along with some best practices. This chapter covers the following topics:
Cursor fundamentals
Cursor execution cycle
Cursor design guidelines
Cursor attributes
Overview of implicit cursor and explicit cursor
Cursor variables
Introduction to subtypes