| Start |
|---|
| Overloading Functions and procedures in packages can be overloaded. The following package TEST has two procedures called print_number, which behave differently depending on parameters they are called with. We call both procedures. The first with integer parameter, the second with varchar2. The output of the above script is: Restrictions on OverloadingOnly local or packaged subprograms, or type methods, can be overloaded. Therefore, you cannot overload standalone subprograms. Also, you cannot overload two subprograms if their formal parameters differ only in name or parameter mode |
| Define a Package header and body with a function. In this example we define a package header and a package body wit a function. Package header: Package body: Calling the function from the package body: |
| Package Usage Packages in PLSQL are a collection of procedures, functions, variables, exceptions, constants, and data structures. Generally the resources in a package are related to each other and accomplish similar tasks. Why Use Packages
Parts of a Package Specification - Sometimes called a package header. Contains variable and type declarations and the signatures of the functions and procedures that are in the package which are public to be called from outside the package. Package Body - Contains the code and private declarations. The package specification must be compiled before the package body, otherwise the package body compilation will report an error. Syntax |
Read Article
https://develop.horje.com/learn/1434/reference