Explain what Is A Package And How Does It Differ From Procedure And Function?

Category: QuestionsExplain what Is A Package And How Does It Differ From Procedure And Function?
Editor">Editor Staff asked 2 years ago

Explain what Is A Package And How Does It Differ From Procedure And Function?

1 Answers
Editor">Editor Staff answered 2 years ago

A package is a group of logically related PL/SQL subprograms bundled together with PL/SQL types and other associated objects. It consists of the following two parts:
Package specification —Includes declaration of all the objects and subprograms that are part of the package.
Package body—Includes the total definition of all the parts of a package that have been declared in the specification.
The whole package is fully loaded into the memory when any package construct is called for the first time. Therefore, it does not require any disk input/output on later calls to constructs in the same package.