Could some one explain me the reason to use Packages as opposed to procedures..
Printable View
Could some one explain me the reason to use Packages as opposed to procedures..
you can combine multiple procedures in to one package .... it's just a way for organizing related procedures in to one group....
some other advantanges of using packages are
1. You can have global variables in a package which can be used by all the procedure/functions in the package.
2. If a procedure/function of a package is called then the entire package will be loaded in the main memory. This improves performance.
There is another advantage on using packages instead of procedure is Overloading.
With packages, u can overload procedures & functions, which means u can create multiple subprograms with the same name in the same package, each taking parameters of different number or datatype. Whereas the same feature is not possible for procedures or functions.
*** Innila ***
If we use the Global Variables in a Packages, that variables are session based or not??
Global variables in a package are session based.
You can declare global (public) variables that exist for the duration of the user session.
*** Innila ***