Subprograms:
This lesson displays how to use subprograms that let a user to name and encapsulate a sequence of statements. The Subprograms aid application development through isolating operations. They are such as building blocks.
- Introduction to Subprograms
- Procedures
- Parameter Modes
- Using and Declaring Functions and procedures
- Notations
- Procedures Vs Functions
Introduction TO Subprograms:
Subprograms are named PL/SQL blocks which can take parameters and be invoked. PL/SQL has two types of subprograms known as functions and procedures. Commonly, a procedure is used to perform an action and a function to compute a value.
Such as unnamed or anonymous PL/SQL blocks and subprograms have a declarative part/ an executable part and an optional exception-handling part. The declarative part holds declarations of categories, cursors, variables, constants, nested subprograms and exceptions. These items are local and cease to exist when you exit the subprogram. An executable part holds statements which assign values that control execution and manipulate the Oracle data. The exception-handling part holds exception handlers that deal with exceptions raised in during execution.